Shop OBEX P1 Docs P2 Docs Learn Events
basic stamp: music with flashing leds. — Parallax Forums

basic stamp: music with flashing leds.

gmchuslogmchuslo Posts: 1
edited 2011-11-24 10:00 in BASIC Stamp
Can you program the basic stamp to play a song and flash leds at the same time?

Comments

  • ercoerco Posts: 20,256
    edited 2011-11-17 14:48
    Takes a bit of work to weave the two together since the Stamp can't do anything while it's playing a note. But you can play a note, toggle an LED, play a note, toggle an LED, etc. so fast that it looks fairly seamless. Plus that way, your LEDs always flash in sync with the notes.

    If you play the same short note plus toggle LED over & over, it will look like the LED is flashing while one long note is played and you probably won't be able to hear any space between the notes.
  • CrazyrabbitCrazyrabbit Posts: 116
    edited 2011-11-24 10:00
    A simple way is to run the freqout signal through a 1K resistor to the base of a 2n2222 transistor to drive the LED.I also ran the freqout signal to a 4017 decade counter for music controlled chase lights. I used a diode in series.. There are some other programs in this forum also using LEDS to music.
Sign In or Register to comment.