Shop OBEX P1 Docs P2 Docs Learn Events
Help! Chapter 2 in Robotics with the Boe-Bot - Blinking LEDs — Parallax Forums

Help! Chapter 2 in Robotics with the Boe-Bot - Blinking LEDs

niconiconiconiconiconico Posts: 4
edited 2012-12-28 06:54 in BASIC Stamp
I feel so silly posting this really simple question, but I'm doing the exercises in chapter 2 of the book that came with my Boe-Bot kit, and I can't get the LEDs to light up. I followed the circuit schematic to wire up the board, and typed in the code provided in HighLowLed.bs2. However, while the debug string does pop up, the LED doesn't blink. I've tested it by moving different parts around the board, using a different battery, removing any indentation in the code, and even placing a debug statement in the loop in order to see if the information in the loop is actually looping (it is). I'm assuming it's my connections on the board, but I've tried all sorts of combinations to try to get it to work.

What are some common problems that arise with this exercise? Am I posting in the correct board? What could be the matter?

Here's what my code looks like:
' Robotics with the Boe-Bot - HighLowLed.bs2
' Turn the LED connected to P13 on/off once every second.


' {$STAMP BS2}
' {$PBASIC 2.5}


DEBUG "The LED light is blinking!"


DO
  HIGH 13
  PAUSE 500
  LOW 13
  PAUSE 500
LOOP

I have the Board of Education board.

Comments

  • ZootZoot Posts: 2,227
    edited 2012-12-27 07:52
    Here are the possibilities:

    - your wiring is incorrect (LEDs backwards, incorrect connections to pins or ground, etc)

    - your resistors are incorrect (too high)

    - your LEDs are bad

    - your Stamp is damaged

    Can you take a picture of your exact wiring setup and post it? It's hard to know much more w/o seeing what's going on.
  • niconiconiconiconiconico Posts: 4
    edited 2012-12-27 09:33
    Thanks for responding so quickly.

    Here's a picture of my setup:

    IMG_20121227_112152.jpg

    (Sorry for the bad image. Cell phone photo.)

    Since it's hard to see in this image, I have the longer ends of the LEDs in the white part of the board, and the shorter ends are in the black portion. The resistors are plugged into the white part as well as P12 and P13. Their bands are yellow, violet, brown, and gold.
    1024 x 768 - 115K
  • ZootZoot Posts: 2,227
    edited 2012-12-27 10:33
    That looks like it should work. Are you sure the LEDs are regular LEDs and not IR LEDs? Take the end of a resistor that is hooked up to a pin (either one) and put that end of the resistor into a Vdd hole (+5v). The LED should light up. If it does not, the LED is either bad, or the LED is an IR led. To see if it's the latter, look at the LED through a digital camera (cell phone would probably work) and see if it's lit up. If it is, then use a regular LED. If it does not light up, it could be a bad LED (of any kind).

    If the LED lights up normally right away when you move the resistor to Vdd, then it is possible you have a bad pin on the Stamp (seems less likely though).
  • niconiconiconiconiconico Posts: 4
    edited 2012-12-27 11:36
    I tried both kinds of LEDs that came with the kit, and neither of them lit up. I also put it in a Vdd hole and it didn't light up then, either. I checked out each configuration with a digital camera, and they weren't lit up then as well. From what I gather, it's probably a bad LED in that case? Is it possible all of them are bad, or is it more likely the board is bad?
  • ZootZoot Posts: 2,227
    edited 2012-12-27 11:57
    "I also put it in a Vdd hole and it didn't light up then, either. "

    You used a resistor, correct? If not, the LED will probably burn out due to over current.

    The "flat" spot on the side of the base of the LED should go to - (ground, Vss) and the other lead of the LED should go THROUGH A RESISTOR to + (5v, Vdd). If you do that, and you have 5v on your Vdd header sockets it seems very unlikely that every LED is bad. If you have hooked up the LEDs without resistors (either to a Stamp pin or to 5v power) then it is possible to burn the LED out very quickly.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-12-27 12:24
    Those are kind of funny looking LEDs. They might be the phototransistors used to detect light.

    From the pictures, it looks like the BOE-Bot should come with some red LEDs made with red plastic.

    The BOE-Bot should also have two IR LEDs with clear plastic lenses.
  • ZootZoot Posts: 2,227
    edited 2012-12-27 12:39
    Thanks, Duane -- yeah, totally possible they are not even LEDs of any wavelength.

    niconiconico -- do you have any regular red or green or yellow LEDs lying around to test with?
  • niconiconiconiconiconico Posts: 4
    edited 2012-12-28 06:54
    That was the issue. Those weren't LEDs, the red ones were. Thanks for your support, everyone.
Sign In or Register to comment.