Author Topic: $50 Robot LED not turning on after programming  (Read 3660 times)

0 Members and 1 Guest are viewing this topic.

Offline adanvascoTopic starter

  • Full Member
  • ***
  • Posts: 107
  • Helpful? 6
  • Necessity is the mother of invention.
$50 Robot LED not turning on after programming
« on: May 16, 2011, 11:40:02 AM »
I've noticed some people have been unable to get the LED to turn on after downloading the .hex file to the MCU. The is a minor change in the code that has to be made in order for this to work.

Open the Photovore_v1.c file after downloading it from the tutorial. You can do this with AVR Studio or just any text editor. Find the line where it says: "/*********ADD YOUR CODE BELOW THIS LINE **********/". Right below that line, change the code from "LED_off();//turn LED on" to "LED_on();//turn LED on". That actually tells the MCU to turn PORTD 4 (pin 6) off, which sets it to GND or Low allowing the LED to come on. ;)
« Last Edit: May 17, 2011, 11:46:14 AM by adanvasco »
Knowledge does not weigh.

Offline arrrrgon

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: $50 Robot LED not turning on after programming
« Reply #1 on: May 19, 2011, 08:40:03 AM »
I tried this once before, my LED still never worked.  I think some people just get bad LEDs, because the robot itself works fine.

Offline adanvascoTopic starter

  • Full Member
  • ***
  • Posts: 107
  • Helpful? 6
  • Necessity is the mother of invention.
Re: $50 Robot LED not turning on after programming
« Reply #2 on: May 19, 2011, 10:02:08 AM »
Have you checked the polarity on the connection? You can also try connecting the LED directly to a couple of AA batteries using a >300 Ohms resistor. If it doesn't turn on this way, then just replace it.

I hope this helps.
Knowledge does not weigh.

Offline VegaObscura

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: $50 Robot LED not turning on after programming
« Reply #3 on: May 19, 2011, 12:01:16 PM »
Actually admin made a mistake when he made the tutorial.  He said "Make sure the longer lead (+) of the polarized LED is on the side closer to the DIP socket."  But in order for the LED to come on, it needs to have the SHORTER lead next to the DIP socket, because the current is supposed to go from the +5V bus, through the LED, and into the atmega.