Shop OBEX P1 Docs P2 Docs Learn Events
LED not working — Parallax Forums

LED not working

noteleksnoteleks Posts: 3
edited 2009-06-30 21:14 in BASIC Stamp
I bought the BOE-BOT kit. I was able to get the BOE-BOT to work the first program. So I went to Chapter 2 and started the LED project. The book suggests you do that before you start putting your bot together. I cannot seem to get the LED to blink. I hooked up the two red LED and the two 470 ohm resistors. I made sure the color code was correct on the resistors and made sure the shorter leg is in Vss. I also made sure that they were put into the right ports. I wrote the program. I hit run the program runs and shows the statement. But the light does not blink. What could be wrong?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-28 03:58
    How do you have the LEDs and resistors hooked up? Exactly what program did you compile and run? Include your source file as an attachment to a message.

    Most likely you either wired things wrong or entered the program wrong or both. Describe completely how you wired the LEDs or attach a schematic showing what you actually have (not what you're supposed to have).
  • SandgroperSandgroper Posts: 62
    edited 2009-06-28 08:26
    There are a few thing you could check.· Simplify things first by trying to get just one LED working.

    Start with the power supply.· Make sure that you have fresh batteries and that everything is plugged in and turned on.· If the LED is lighting up but not blinking, the power is probably OK.

    If the LED isn't lighting up, test it by itself.· You can do this by connecting the shorter leg to ground, the longer leg to one end of a 470 Ohm resistor, and the other end of the resistor to 5v.· The·LED should light up.·· If it doesn't, then either you have no power, the LED is faulty, or the LED is in backwards.

    If the LED is working, the next step is to check to see if the pin on the chip is putting out a signal.··This is easy if you have a pulse detector or a multimeter.·

    The third item·you should check is how long the LED's are supposed to stay on for.· You need to have a delay in the program that allows the LED to stay on long enough for you to see it.· To make it blink, you also have to switch it off for the correct amount of time.· 0.5 seconds ON and 0.5 seconds OFF will make it blink once for half a·second.··To make it blink continuously your program needs·to switch it·on, wait, switch it off, wait, then loop back to switch it on again.

    If your LED is lighting up but is very faint, then it could be·switching the LED on and off too quickly.· You might need to check the·on / off time delays.·

    Another item to check is whether or not the pin that the LED is connected to has been configured as an·OUTPUT or an INPUT, and also whether it's configured as HIGH or LOW.·

    Lastly, make sure that the LED is connected to the correct pin.· It's easy to confuse the pin numbers on the chip.·
  • noteleksnoteleks Posts: 3
    edited 2009-06-29 02:24
    Ok, the trick with checking if the LED's were good worked. I was able to connect everything correctly. I have my bot together now and I am working on the navigation part. This is really awesome. Never thought at 50 years old I would get interested in something like this. But I am hooked now. Thank you to both of you for the help.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-06-30 21:14
    Welcome to the Fourm



    I hope you have a Lots of fun with your BOE-BOT kit····· smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.