top of page
Intruder Alert Code

int sensorValue;

void setup() {
  Serial.begin(9600);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
}
void loop() {

  sensorValue = analogRead(A0);
  Serial.println(sensorValue);
  if (sensorValue < 400) {
    digitalWrite (8, HIGH);
    tone (9, 400);
    delay(575);
    noTone(9);
  }

else {
  digitalWrite (8, LOW);
}
  delay(10);
}

Igniting Innovation through Functional Prototyping and Physical Computing

Contact Information

odysseyboardedu.@gmail.com
Phone: (360) 303-5526
24338 Lee Road
Mount Vernon, WA 98274

Contact Us

Thanks for submitting!

© 2017 by Odyssey Board. All rights reserved.

bottom of page