IR Led and Phototransistor connection give always 0 value


firstly hello everyone,

i planned make wheat grain counter. use phototransistor , ir led count them all. have arduino uno, used 470 ohm resistor ir led, 10k ohm resistor 3 pin phototransistor , connecting phototransistor a0. codes are


code: [select]
int tran=a0;
int reslt;
void setup()
{
  serial.begin(9600);
  pinmode(tran, input);
}

void loop()
{
  reslt = analogread(a0);
  serial.println(reslt);
}


and on serial monitor 0 value. ? have do. want phototransistor when grains pass through between phototransistor , ir led, counter increase havent connected them truely yet...

sounds wiring error.  how wired?


Arduino Forum > Using Arduino > General Electronics > IR Led and Phototransistor connection give always 0 value


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support