Shop OBEX P1 Docs P2 Docs Learn Events
BASIC Stamp, LED Controller and a Kiosk — Parallax Forums

BASIC Stamp, LED Controller and a Kiosk

iltmtiltmt Posts: 3
edited 2010-08-16 07:32 in BASIC Stamp
Good afternoon all,

I've inherited a kiosk which I need to repurpose for use in displaying information to the public (not sure what it's purpose was before I got it). On the front of the kiosk are 32 bright blue LEDs which light up in sequence. The LEDs are connected to a controller board with PAK-Vc ICs, and the controller board is connected to a BASIC Stamp 2.

The LEDs are very bright, almost to the point of distracting when you are standing in front of the kiosk using the touchscreen computer. The computer has a screensaver which kicks in after 5 minutes, so what I would like to do is somehow link the action of the screensaver turning on to turning on the LEDs. When somebody presses on the touchscreen to deactivate the screensaver, I would like the LEDs to turn off.

The computer has a serial port, and the Stamp 2 is right there inside the kiosk with the computer. I'm guessing it's a matter of getting the action of the screensaver turning on/off to output on the serial port, and getting the Stamp 2 to recognize that. I have many years of IT and programming experience, but have never had anything to do with Stamp devices, so I could be way off base.

If anyone has any ideas on how to do this, or can provide me a link to some examples, I would greatly appreciate it. My other option is to completely disable the LEDs permanently, which I would prefer not to do since it does look pretty cool.

The other problem with this is the original maker (makers?) of the kiosk are long gone. I understand there is no way to pull a program OFF a Stamp device, correct? If there is, please let me know. Otherwise I'll need to figure out how to drive the PAK-Vc controller board from scratch. Any ideas on that would be appreciated as well.

Thank you in advance for any help you can provide me!

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2010-08-12 19:09
    Hello iltmt, and welcome to tthe forums.

    First, since you mentioned that you're not too familiar with the Basic Stamp. you should download and look at the "What's a Microcontroller" manual, as well as the "Basic Stamp Syntax and Reference Guide". Both are available on the website, and will help you get started.

    As for your project, you could do a few things. One is to run a program on the PC that can detect the screensaver state, and send a serial signal based on that state or state transitions. Another possibility would be to use a color or light sensor (or similar) connected to the BS2 to detect changes in the kiosk environment, and toggle the LEDs based on that.

    As for getting the program from a BS2... you really can't. The BS2 editor converts your source code into bytecode tokens, which are then loaded to the BS2 eeprom. The BS2 interpreter then runs these bytecodes. So basically, the source is gone. But if your needs aren't too complex, it shouldn't be too difficult to rewrite the program.
  • iltmtiltmt Posts: 3
    edited 2010-08-13 05:32
    Thanks for the information Kevin. I've been looking over the Syntax and Reference Manual, but I'll check out the other one you mentioned as well.

    So doing some searching I've found code examples for checking the state of the screensaver. It will just be a matter of writing the code to do that, and then to (I assume) send a signal over the serial port for the BS2 to detect. If anyone has any examples or knows of precompiled code that does this, please let me know.

    As far as rewriting the code to control the LEDs... I've checked on AWC's website and I see some sample code for controlling a PAK-Vc via Stamp. I have four PAK-Vc ICs on the board to control, so again I assume it will be a matter of writing the code to drive four ICs instead of one. There is only one wire connecting the BS2 to the LED controller board, so all the signals must be sent over that one wire.

    Thanks again for the information Kevin!
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2010-08-13 14:33
    Do you have links to the screensaver code samples?
  • iltmtiltmt Posts: 3
    edited 2010-08-16 07:32
    Hi Kevin,

    There were a few search results with code snippets, but this link here:

    http://www.codeguru.com/forum/showthread.php?t=11087

    gives a complete VB 6.0 example. I haven't had a chance to see if it works or not. I will be ordering a BS 2 with carrier board this week to start testing with, as I don't want to mess up the BS 2 I've currently got driving the LED controller.

    Thanks!
Sign In or Register to comment.