outputs/inputs

69-cat

Member
Can you turn on/off multiple pins in a single line? "I think" I have seen other codes within the forum do this but cant seem to remember if or how it can be written out.
Dave
 

Technical

Technical Support
Staff member
let dirsB = x make them outputs e.g. %11111111
let pinsB = x to switch them on/off e.g. %10101010
 

westaust55

Moderator
Commands which can turn on/high or off/low,
but not both on and off in the same command
Are the HIGH and LOW commands.
Eg
HIGH B.0, B.5, B.6, C.3

The TOGGLE command can change the state high to low and low to high of several pins
Some may already be high and others low - the state off all pins listed will be swapped/toggled:
TOGGLE B.1, B.3, C.5
 

69-cat

Member
Thanks, I got it. I have a rather large Halloween prop that I am working on the code. My first code using resume/suspend and I found it working well.
Dave
 

Technoman

Senior Member
... one or more pins:
I missed that!

A suggestion for the doc : "TOGGLE pin_1,pin_2,pin_3,... / Pin_x - is a variable/constant which specifies the i/o pin to use."

And a code example illustrating this case...
 
Top