//Michael Klements
//The DIY Life
//17 May 2019
//chip design stolen from here:
// https://wokwi.com/projects/339700374803841619
int ledPin = 13; // choose the pin for the LED
int buttonValue = 0;
void setup()
{
//pinMode(A0, INPUT);
pinMode(ledPin, OUTPUT); // declare LED as output
Serial.begin(9600);
}
void loop()
{
buttonValue = analogRead(A1); //Read in the button value
Serial.println(buttonValue);
/*if (buttonValue>=1009 && buttonValue<=1020) //Switch the LED on if button is pressed
digitalWrite(ledPin, HIGH);
if (buttonValue>=999 && buttonValue<=1007)
digitalWrite(ledPin, HIGH);
if (buttonValue>=984 && buttonValue<=997)
digitalWrite(ledPin, HIGH);
if (buttonValue>=953 && buttonValue<=982)
digitalWrite(ledPin, HIGH);
if (buttonValue>=910 && buttonValue<=951)
digitalWrite(ledPin, HIGH);
else
digitalWrite(ledPin, LOW); //Switch the LED off if button is not pressed*/
}