Society of Robots - Robot Forum
General Misc => Misc => Topic started by: Trumpkin on February 03, 2008, 05:14:45 PM
-
I finally got my servos to move backward and forwards. I'm really happy!! ;D ;D can someone point me to the post or tutorial where it says how to read sensors? I know I saw it somewhere
-
not sure about the post . . .
but look around for 'ADC', 'analog to digital converter', and here is an example:
rangefinder=a2dConvert8bit(5);//sensor is on ADC port 5
//output message to serial (use hyperterminal)
rprintf("Hello, World! Read My Analog: %d\r\n", rangefinder);
-
thx. there must not be a post. undortunately I just fried my Atmega eight because I was stupid ::). I will get Atmega168 now and some female headers for Sharp IR sensor......more waiting. >:(