Author Topic: another $50 robot question  (Read 1606 times)

0 Members and 1 Guest are viewing this topic.

Offline morphixsterTopic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
another $50 robot question
« 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

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: another $50 robot question
« Reply #1 on: March 20, 2010, 05:12:35 AM »
You must program the microcontroller for the LED to turn on.

Offline 123laurens

  • Full Member
  • ***
  • Posts: 59
  • Helpful? 0
Re: another $50 robot question
« Reply #2 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!
« Last Edit: October 06, 2010, 12:02:48 PM by 123laurens »

 


Get Your Ad Here