// **** basic switch function by Gareth
#include "oled.h" //load the oled with Adafruit_SSD1306.h library
//############
int TN2 = 2; //turnstile 2 on pin 2
int TN1 = 4; //turnstile 1 on pin 4
int riders = 0; // how many people in queue
void setup() {
setup_oled(); // Start the OLED Display
}
void loop() {
digitalWrite(TN2, HIGH); //
OLED_SENSOR("COUNTER> ", counter());
sdelay(1); //run loop at max speed
if (digitalRead(A0) == LOW) {
setcounter(5000); // 5 seconds
}
}