Reads the value from a specified digital pin, either HIGH or LOW.
- pin: the Arduino pin number you want to read
- HIGH or LOW
Sets pin 13 to the same value as pin 7, declared as an input.
※ NOTES AND WARNINGS:
- If the pin isn't connected to anything, digitalRead() can return either HIGH or LOW (and this can change randomly).
- The analog input pins can be used as digital pins, referred to as A0, A1, etc. The exception is the Arduino Nano, Pro Mini, and Mini's A6 and A7 pins, which can only be used as analog inputs.
※ ARDUINO BUY RECOMMENDATION
|Arduino UNO R3 Buy on Amazon|
|Official Arduino Starter Kit Buy on Amazon|
|ELEGOO UNO R3 Starter Kit Buy on Amazon|