Shop OBEX P1 Docs P2 Docs Learn Events
assigning 4 seperate leds from 1 output pin — Parallax Forums

assigning 4 seperate leds from 1 output pin

mkeith123mkeith123 Posts: 2
edited 2006-05-21 03:24 in BASIC Stamp
In experiment three of the stampworks book,4 leds flash at the same time. I want to make the leds work seperatley, but they all work at the same time, even though I assigned each pin seperatly in the programming.·Is this because of the way the breadboard is conneted, or does each led need·a seperate output pin from the bs2 stamp?

Comments

  • SSteveSSteve Posts: 808
    edited 2006-05-20 23:21
    If you have all 4 LEDs connected to one pin, they'll all go on and off at the same time. If you want to control them independently, you'll have to connect them to separate pins.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows
  • bushibushi Posts: 12
    edited 2006-05-21 03:24
    If you only wanted one light on at a time, you could do it with two pins and some "glue" chips. Using NAND gates and inverters it would be easy to turn on one of the four LEDs depending on the ON/OFF combinations you'd have with two pins.
Sign In or Register to comment.