Help needed - BS2SX as relay controller
Veeate
Posts: 7
Hi. I'm a new stamp user and really could use some help getting started.
I'm trying to use a BS2SX to control some relays, but don't know exactly where to start.
To start, I'd like a list of commands to loop indefinately until I power the unit off.
The following simply switches relays 1 and 2 on/off:
SEROUT 0, 16390,[noparse][[/noparse]254,108,1]
PAUSE 750
SEROUT 0, 16390,[noparse][[/noparse]254,100,1]
SEROUT 0, 16390,[noparse][[/noparse]254,109,1]
PAUSE 750
SEROUT 0, 16390,[noparse][[/noparse]254,101,1]
What else do I need to include in my program? Obviously some sort of do/loop command?
Any help would be GREATLY appreciated!!!
Thanks,
Jason
I'm trying to use a BS2SX to control some relays, but don't know exactly where to start.
To start, I'd like a list of commands to loop indefinately until I power the unit off.
The following simply switches relays 1 and 2 on/off:
SEROUT 0, 16390,[noparse][[/noparse]254,108,1]
PAUSE 750
SEROUT 0, 16390,[noparse][[/noparse]254,100,1]
SEROUT 0, 16390,[noparse][[/noparse]254,109,1]
PAUSE 750
SEROUT 0, 16390,[noparse][[/noparse]254,101,1]
What else do I need to include in my program? Obviously some sort of do/loop command?
Any help would be GREATLY appreciated!!!
Thanks,
Jason
Comments
If it’s that simple then that is all you need…
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Turns out my trouble was related only to the baud rate code (I was given a number for a BS2 not the SX).
Everything is up and running now and I appreciate all the help.
You didn’t indicate in your earlier posts that you were having trouble with the code or that you had a BS2sx. In fact your first message indicated that the code you had was working. Just something to keep in mind for future posts. In any event I’m glad you got it working. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Problems are the "roads" of life,
solutions are only "onramps" to the next problem
············································· "Brad Smith"
·