en-us_commands:reference:ialt
This is an old revision of the document!
Table of Contents
Ialt()
Ialt() toggles the specified state ON/OFF at each input rising edge.
void Ialt(bool input, bool &state_var)
Commands
| Command | Arguments | Return Value | Operation |
|---|---|---|---|
Ialt(input, state_var) | bool inputbool &state_var | void | Toggles the specified state ON/OFF at each input rising edge. |
Example
bool lampState = false; void loop() { Ialt(digitalRead(0), lampState); digitalWrite(32, lampState); }
Precautions
Using the same id for different signals may mix their previous states. Do not set the minimum and maximum of the Iscale input range to the same value.
en-us_commands/reference/ialt.1788785565.txt.gz · Last modified: by 127.0.0.1
