Basically, if you want something to be an input (like the pressure switch), start with
where X is the number of the pin you want to make be an input. Likewise, use
for any pins you want to be outputs (relays, PWMs, etc).
Then, the bit variables inX and outX (pre-defined by the BS2, don't worry about declaring them) will represent the states of these pins. For example:
Code:
Output 2
Input 3
out2=0
if (in3=0) then switchIsOff
out2=1
switchIsOff:
Remember, the normal BS2 does NOT use serin/serout for I/O, everything is pin-addressable only. Also, you won't be able to use the Spike relays that we use for FIRST as they are specific to the Isaac32(or 16) controllers.