Shop OBEX P1 Docs P2 Docs Learn Events
Dumb question of the day — Parallax Forums

Dumb question of the day

George99George99 Posts: 16
edited 2006-07-28 17:14 in BASIC Stamp
Maybe it's just too early.

I was demonstrating the basics of the BS2 so I hooked up an LED in series with a 470 ohm resistor between VSS and P14.

The following program turns the LED on for a second then off.

' {$STAMP BS2}
' {$PBASIC 2.5}
HIGH 14
PAUSE 1000
LOW 14
END

It works great: when I press F9, the LED and the homework board run lights go on for 1 second as planned. But if I press reset on the homework board or disconnect and reconnect the battery, nothing happens.

I added a line DEBUG "Ending now",CR between LOW and END, then it works as expected. Why?

Comments

  • George99George99 Posts: 16
    edited 2006-07-28 12:02
    Solved! (sort of)

    I moved the serial cable from COM2 to COM1 and now it works. Computers, bah.
  • FranklinFranklin Posts: 4,747
    edited 2006-07-28 17:14
    To get more out of this try:

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    DO
    HIGH 14
    PAUSE 1000
    LOW 14
    PAUSE 1000
    LOOP
    END

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.