#define BUZZER_PIN 19
#define SENSOR_PIN 18
#define VISUAL_PIN 5
#include <Ticker.h>
Ticker ticker;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(VISUAL_PIN, OUTPUT);
pinMode(BUZZER_PIN,OUTPUT);
pinMode(SENSOR_PIN,INPUT);
ticker.attach(2, timerCallBack);
}
void loop() {
if(digitalRead(SENSOR_PIN))
{
digitalWrite(VISUAL_PIN, HIGH);
}
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}
void timerCallBack(void)
{
}