Shop OBEX P1 Docs P2 Docs Learn Events
Trouble with first blinking LED program — Parallax Forums

Trouble with first blinking LED program

winfordwinford Posts: 5
edited 2013-02-19 14:40 in BASIC Stamp
Hi, I have a new BOE BOT and can't get the first LED test circuit to work. I have connected the 2 resistors and the two red LEDs exactly as shown in the Manual and have triple-checked the program for accuracy. The LEDs do not blink when I run the program however, 2 very small LEDs (1red and 1blue) flash alternatley when I run the program. I must be doing something wrong but can't figure out what it is. Help, Pl?.

Comments

  • Mike GMike G Posts: 2,702
    edited 2011-12-06 13:19
    Welcome to the forum, winford.

    Please post your source code and a description of your connections. How are you powering the BOE?
  • doggiedocdoggiedoc Posts: 2,245
    edited 2011-12-06 13:25
    Hey winford! Welcome to Parallax! Like Mike G said posting your code may help and if you'll use [noparse]
    ...
    
    [/noparse] to enclose you code it will format better on the forums. Another set of eyes on the code might help catch something you've overlooked. Also - you hardware configuration might be an issue. An LED turned backward or such could cause the circuit to fail.

    Anyway - we look forward to helping you more. Love those BoeBots!

    Doc
  • ercoerco Posts: 20,257
    edited 2011-12-06 13:26
    Also post a close-up photo of your BoE & components.

    Do you have the polarity of the red LEDs correct? They only light up one way.

    Edit: DoggieDoc beat me to it!
  • John BoardJohn Board Posts: 371
    edited 2011-12-06 18:14
    Hi,

    I'm new to the forums myself, however I have assembled the BOE-Bot ATLEAST 2 times. If you could, as erco said, post a pic of your electronics and source (code), then that would help a lot :)

    Happy Boe-Botting!

    John
  • softconsoftcon Posts: 217
    edited 2011-12-07 05:53
    Another thing to check (don't know if it applies here or not) is to make sure you're using the proper $stamp directive in your program. It took me a couple days to figure out that I wasn't using bs2 as my stamp type, so even though everything compiled properly, downloaded to the board, and ran, I wasn't getting blinking leds either. After I added the
    ' {$STAMP BS2}
    
    directive, everything worked perfectly.
    hth.
  • winfordwinford Posts: 5
    edited 2011-12-07 21:39
    Mike G.
    Doggiedoc
    erco
    John Board
    softcon

    Thanks very much for your offers of help. I hope the code will display correctly per instructions.

    'Robotics with the Boe-Bot - HighLowLed.BS2
    'Turn the LED connected P13 on/of once every second
    
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    DEBUG "The LED connected to Pin 13 is blinking!"
    
    DO
    
     HIGH 13
     PAUSE 500
     LOW 13
     PAUSE 500
    
    LOOP
    
    

    I won't be able to send a picture until tomorrow, but I hope this info will help.
    thanks again!
  • winfordwinford Posts: 5
    edited 2011-12-07 21:42
    The word [/code] was at the end of the source code as sent, but didn't show up in my reply
  • PublisonPublison Posts: 12,366
    edited 2011-12-08 03:54
    In your code, you are sending the signal out on P13, which is actually pin18 on a BS2. The number in the code refers to a I/O "Port" number and they don't correspond with pin numbers. Take a look at page 13 in version 2.2 of the Basic Stamp Manual for the pinouts.
  • PublisonPublison Posts: 12,366
    edited 2011-12-08 08:26
    I think I may have confused matters with my last post. I believe you are running the exercise on page 48 in the Robotics with the Boe-Bot? So I assume you are using P13 next to the breadboard. I also notice the sample code DEBUG statement refers to "Pin 13". Page 51 shows the pinout.

    With a picture we can verify that the circuit is connected correctly.

    Sorry for the confusion.
  • ercoerco Posts: 20,257
    edited 2011-12-08 11:08
    What a helpful and responsive group. I suspect that if winford posted his address (not suggested), someone from the forum would be knocking on his door to help within a few hours! :)
  • winfordwinford Posts: 5
    edited 2011-12-08 12:13
    Mike G
    doggiedoc
    erco
    John Boardasset.php?fid=85907&uid=65755&d=1323374723jpg.gif
    softcon
    Publison

    I'm attaching a photo of the connections. Hope this helps. Thanks again, all!
    640 x 480 - 66K
  • PublisonPublison Posts: 12,366
    edited 2011-12-08 12:23
    Ahhh...I can see where the problem is. The "P" numbers on the single black strip are not connected to the bread board. Page 48 shows the resistors plugged into the black strip. You could put another jumper wire from P13 to the resistor is you choose, or just put the resistor into the P13 female header.

    Not a problem. We all have been there. Do not let it stop you from going forward now. :)
  • ercoerco Posts: 20,257
    edited 2011-12-08 13:22
    Good eye, Publison! I made that mistake several times. Now I've moved on to making brand new mistakes. THAT'S progress!
  • doggiedocdoggiedoc Posts: 2,245
    edited 2011-12-08 13:24
    Man, I've done that a bunch of times! Easy fix! Woo hoo!
    The "P" numbers on the single black strip are not connected to the bread board.

    Paul
  • winfordwinford Posts: 5
    edited 2011-12-08 20:17
    The lessons I take from this thread are (1) look more carefully at diagrams in the manual and (2) there are many very nice people in this Forum willing to help an idiot/newcomer..

    Thanks, all, for your patience and assistance!
  • neidpathneidpath Posts: 3
    edited 2013-02-19 08:57
    Hi

    Brand new to BoeBot and this forum.

    I too am having trouble with the flashing LED project.

    Have followed the threads and would seem to be doing everything correctly but the LEDs are still not flashing.

    My question is: does the value of the resistors affect the project? I am not very good with colours and at 80 years of age my sight is not what it was (not that it ever was great) and therefore I may have the wrong resistors connected.

    Help please.
  • doggiedocdoggiedoc Posts: 2,245
    edited 2013-02-19 09:03
    Hi neidpath - Welcome to the forums!

    Yes, the color bands determine the value of the resistor and the too much resistance (too high value) can keep the LEDs from being visible. Do you have a way of magnifying your view of the resistor bands so you can more readily determine the colors?

    Paul
  • neidpathneidpath Posts: 3
    edited 2013-02-19 09:28
    Thanks doggiedoc - found the correct resistors and that did the trick.

    On to the next project (and problem no doubt)
  • ercoerco Posts: 20,257
    edited 2013-02-19 14:40
    Welcome neidpath! Glad to hear you're back on track.

    Yours was a very easy mistake to make. Especially in this age of tolerance, we have all been conditioned to think that "color doesn't matter". But in the electronics game, all resistors are NOT created equal, for a variety of reasons! :)
Sign In or Register to comment.