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
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...
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
Post a Comment