This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int REED_PIN = 10; | |
| int redLedPin = 2; | |
| void setup() { | |
| Serial.begin(9600); | |
| pinMode(2, OUTPUT); | |
| pinMode(LED_BUILTIN, OUTPUT); | |
| pinMode(REED_PIN, INPUT_PULLUP); // Enable internal pull-up for the reed switch | |
| pinMode(redLedPin, OUTPUT); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "Adafruit_VL53L0X.h" | |
| Adafruit_VL53L0X lox = Adafruit_VL53L0X(); | |
| void setup() { | |
| Serial.begin(115200); | |
| pinMode(10, OUTPUT); | |
| // wait until serial port opens for native USB devices | |
| while (! Serial) { |