Two serial in, one out
Smoothmachines
Posts: 2
Hi!
I would like to input two barcode scanners into the STAMP and after processing send the info to a serially controlled DMX controller.
First, is it possible to use the STAMP as a switch/hub for the two scanners?
(i can input any serial string that fits the STAMP)
Then, is it possible to poll wich scanner was first to input and take a note of it so i can take a new decision depending on the second scanner inputing a string within a given time?
Thanks for advice!
All the best from Sweden
Bruno
I would like to input two barcode scanners into the STAMP and after processing send the info to a serially controlled DMX controller.
First, is it possible to use the STAMP as a switch/hub for the two scanners?
(i can input any serial string that fits the STAMP)
Then, is it possible to poll wich scanner was first to input and take a note of it so i can take a new decision depending on the second scanner inputing a string within a given time?
Thanks for advice!
All the best from Sweden
Bruno
Comments
It is possible to read two (or more) serial devices with the Stamp. However, you can only deal with one at a time. Also, the Stamp has no serial buffer so you actually have to have the program waiting for the serial string when it appears.
In simple form, you could do this:
Program waits for serial string from scanner #1.
Receive serial data #1
Program waits for serial string from scanner #2
Receive serial data #2
Process data and send serial string to DMX.
Cheers,
Yes, this discribes exactely the idea, nice to hear it is possible.
Would you label this as advanced programming?
Start by reading one scanner and displaying with DEBUG. Then get the second scanner data. Finally, process the data and SEROUT to the DMX.
Ask questions as you go along.