Lighthouse led project
Hi Folks,
I am working on a led project and need some advice. I want to place leds on a map, each marking a location of a lighthouse. Not only do I want to light them, I also want each to flash its own signture, like morris code. I·think there are about 20 all together, each with its own signiture. Can I do this with a basic stamp? Any advice? I have electronics experience, and I did play with some programming.
Thanks for any feedback
Harvy
I am working on a led project and need some advice. I want to place leds on a map, each marking a location of a lighthouse. Not only do I want to light them, I also want each to flash its own signture, like morris code. I·think there are about 20 all together, each with its own signiture. Can I do this with a basic stamp? Any advice? I have electronics experience, and I did play with some programming.
Thanks for any feedback
Harvy
Comments
While the BASIC Stamp (like most other microcontrollers) is a single-tasking device, what you propose could be done, although the programming is a little hairy because essentially you have to make your own time sharing code. I demonstrated this in the past using the code below, but I have to admit, to get the Morse code sequence timing down would take some trimming. Maybe this code will help. Take care.
Note: This code could handle about 10 LEDs.· 6 were implemented.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I just realize the code was uncommented so I thought I better let you know what the data values are…Essentially I have encoded the on/off state for each pattern into each 16-bit value. Bit 15 is the on/off state while the remaining bits determine the delay. This delay is relative to the overall timing of the system in that as you add more processes it will take more time to get to each one again. Nonetheless it is a clever way to sort of simulate different timing patterns not available any other way. In this case the 6 LEDs appear to be blinking at entirely different rates/patterns. A pattern of all zeros indicates to loop back to the beginning of the pattern. This also means each LED can have a different number of on/off states than the others. If you switched to byte values instead of words you could probably realize your goals of 20 LEDs. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
when you get up to the scale of 20 LEDs... if their blink patterns all happen to flash "on" at the same time, is there a chance
it could draw too much current?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support