Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: morphixster on March 20, 2010, 04:16:03 AM

Title: another $50 robot question
Post by: morphixster on March 20, 2010, 04:16:03 AM
I just finished the $50 robot tutorial and although I don't have a cable to connect to the computer but I'm confused about the LED. Is it supposed to light up when the power is connected or did I miss something along the way?
It looks like the LED resistor is hooked up to a pin on the mega8 so i was wondering if that is on when it's connected to the PC.
Any help would be appreciated
Title: Re: another $50 robot question
Post by: Razor Concepts on March 20, 2010, 05:12:35 AM
You must program the microcontroller for the LED to turn on.
Title: Re: another $50 robot question
Post by: 123laurens on October 06, 2010, 09:54:03 AM
like the post above,yes.the command i think was LED_on() and LED_off()
to test,put this in the "main"under /*********ADD YOUR CODE BELOW THIS LINE **********/

Code: [Select]
while(1);
{
LED_on();
delay_cycles(23);
LED_off();
delay_cycles(23);
}
this will cause your led to turn on for 1 second ,then turn off for 1 second ,and so forth until you turn it off
simply replace the code or just add LED_on() at the beginning of your photovore code,replacing the LED_off()

i hope this helps!