Shop OBEX P1 Docs P2 Docs Learn Events
TestBiColorLed.bs2 - blinking opposite colors — Parallax Forums

TestBiColorLed.bs2 - blinking opposite colors

Brooke HedrickBrooke Hedrick Posts: 2
edited 2008-12-30 14:24 in BASIC Stamp
Hey,

I just got my BASIC Stamp for Christmas, self gift ;-), and I have been having fun.· My·son·is getting a kick out of making things happen as many times as his age and making things go faster or slower - light blinking so far!

Anyway, on page 63-65, of What's a Microcontroller, starting with Figure 2-19, I wired up the bi-color-led circuit and then entered the code on page 65.· The code comments indicates the colors should blink red, green, and then off, but I am seeing that they blink green, red, and off.· I double-checked my circuit and the schematic.· I am wondering if this is just a typo in the instructions...· No big deal, just want to make sure I understand what I am looking at.

The flat side of my LED matches the diagram.· If I do reverse the LED to put the flat side on the left, the it does blink red, green, and off.

DO
· HIGH 15······ 'Red
· LOW 14
· PAUSE 500

· LOW 15······· 'Green
· HIGH 14
· PAUSE 500

· LOW 15······· 'Off
· LOW 14
· PAUSE 500
LOOP

Thanks
365 x 300 - 22K
497 x 315 - 23K

Comments

  • MikerocontrollerMikerocontroller Posts: 310
    edited 2008-12-30 05:24
    · I have the bi-color LED from the Basic Stamp Discovery Kit and it behaves as you describe.· You can assume that the green diode's cathode is pin 2 (flat side) and it's anode is pin 1.· The red diode's cathode is pin1 and it's anode is pin 2.·

    · P.S.· Welcome to the forums.

    Post Edited (Mikerocontroller) : 12/30/2008 6:12:33 AM GMT
  • Brooke HedrickBrooke Hedrick Posts: 2
    edited 2008-12-30 14:24
    Thanks Mikerocontroller.
Sign In or Register to comment.