Commit 17d40e56 authored by Cam Gordon's avatar Cam Gordon
Browse files

Added hall sensor test

parent d4ee1711
const int analogIn = A1;
const int ledPin = 6;
void setup() {
// put your setup code here, to run once:
pinMode(ledPin, OUTPUT);
Serial.println("Hall Sensor Test"); // so I can keep track of what is loaded
Serial.println("No Pedestrian");
void loop() {
// put your main code here, to run repeatedly:
int pedestrian = analogRead(analogIn);
bool is_detected = (pedestrian >= 399);
if (is_detected) {
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment