View Full Version : How do you control relays
01-21-2002, 03:41 AM
I've been reading about all of the commands on the bs2sx and there seems to be now way to control the relays, is there any way to do this? Thanks.
01-21-2002, 05:46 AM
MOST Pbasic commands are of no use to the FIRST community because you have very little direct access to the outside world.
To turn on or off a relay, all you have to do is change the appropriate bit of the byte RelayA or RelayB prior to outputting the data to the Master CPU at the bottom of your control loop.
It is not that hard once you look closely at the Default Code.
Innovation First has aliased all the bits to things that make sense so for example you simply put
relay1_fwd = 1
to turn relay 1 on in the forward direction
relay1_fwd = 0
turns it back off.
Try it and get back to us with questions if you run into problems
01-21-2002, 07:42 AM
Joe, I am still thrown off by your new pic :)
vBulletin® v3.6.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.