User Tools

Site Tools


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.

Ialt command operation flow

void Ialt(bool input, bool &state_var)

Commands

Command Arguments Return Value Operation
Ialt(input, state_var) bool input
bool &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.

← Built-in Command List

en-us_commands/reference/ialt.1788785565.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki