LoginSignup
0
0

More than 5 years have passed since last update.

lazuriteでSW

Posted at

概要

lazuriteでSW(スイッチ)やってみた。

写真

CIMG2672.JPG

回路図

image

サンプルコード

void setup() {
    pinMode(7, INPUT_PULLUP);
    pinMode(6, INPUT_PULLUP);
    Serial.begin(115200);
    Serial.println("start");
}

void loop() {
    if (digitalRead(7) == LOW)
    {
        delay(100);
        if (digitalRead(7) == LOW)
        {
            Serial.println("7 on");
        }
    }
    if (digitalRead(6) == LOW)
    {
        delay(100);
        if (digitalRead(6) == LOW)
        {
            Serial.println("6 on");
        }
    }
}

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0