A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://docs.leaflabs.com/static.leaflabs.com/pub/leaflabs/maple-docs/latest/lang/api/loop.html below:

loop() — Maple v0.0.12 Documentation

loop()¶

After creating a setup() function, which initializes your sketch, the loop() function gets called repeatedly, allowing your program to change and respond. Use it to actively control your Maple board.

Example¶
int buttonPin = 38;

// setup initializes serial and the button pin
void setup() {
  SerialUSB.begin();
  pinMode(buttonPin, INPUT);
}

// loop() checks the button pin each time it executes,
// and will print 'H' if it is pressed, 'L' otherwise
void loop() {
  if (digitalRead(buttonPin) == HIGH) {
    SerialUSB.println('H');
  } else {
    SerialUSB.println('L');
  }

  delay(1000);
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4