Discussion forum for the BasicX family of microcontroller chips.
|
I just recieved the GP2D12 Sharp infrared sensor, but when I connect it up to the BX24 chip and use a Get ADC from the controller pin. I have it print to the screen the value. The value constantly changes , but very randomly. For example it prints 455, 455, 92, 1009, 1009. These values don't change when I move objects infront of the sensor, they just change like this no matter what's going on. I had the controller pin on the sensor plugged into pin 19 and I have tryed 2 different power supplies. The first one being pin 21 for Power input and then just grounding the sensor to the bx-24 and I have also tryed it with the power and ground coming from a different battery and I get the same rsults no matter what. What am I doing wrong? |