Laser detection

PHOTO EMBED

Wed May 15 2024 04:13:15 GMT+0000 (Coordinated Universal Time)

Saved by @iliavial #c#

void setup() {
  // put your setup code here, to run once:
  pinMode(13, OUTPUT);
  pinMode(3, INPUT);
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (digitalRead(3) == LOW)
  {
    digitalWrite(13, HIGH);
    delay(10);
  }
  else
  {
    digitalWrite(13, LOW);
    delay(10);
  }
}
content_copyCOPY