Skip to content

Instantly share code, notes, and snippets.

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);
}
#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) {