// // #define red 2
// // #define blue 25
// #define purble 4
// #define pushbutton 35
// void setup(){
// pinMode(purble, OUTPUT);
// pinMode(pushbutton, INPUT);
// }
// void loop(){
// int value = digitalRead(pushbutton);
// if(value == HIGH){
// digitalWrite(purble, HIGH);
// delay(1000);
// digitalWrite(purble, LOW);
// }
// }
// #define ledPin 4
// # define buttonPin 35
// int counter = 0;
// void setup() {
// pinMode(ledPin, OUTPUT);
// pinMode(buttonPin, INPUT_PULLUP);
// Serial.begin(115200);
// }
// void loop() {
// int value = digitalRead(buttonPin);
// if (value == HIGH) {
// counter ++ ;
// Serial.println(counter);
// if (counter == 1) {
// digitalWrite(ledPin, HIGH);
// }
// else {
// digitalWrite(ledPin, LOW);
// counter = 0 ;
// }
// delay(200);
// }
// }
// bool ledState = false;
// bool buttonState = false;
// bool lastButtonState = false;
// void setup() {
// pinMode(ledPin, OUTPUT);
// pinMode(buttonPin, INPUT_PULLUP);
// Serial.begin(115200);
// }
// void loop() {
// buttonState = digitalRead(buttonPin);
// if (buttonState == LOW && lastButtonState == HIGH) {
// ledState = !ledState;
// digitalWrite(ledPin, ledState ? HIGH : LOW);
// }
// lastButtonState = buttonState;
// }
/*
void setup() {
// put your setup code here, to run once:
pinMode(blue, OUTPUT);
pinMode(red, OUTPUT);
pinMode(purble, OUTPUT);
pinMode(pushbutton, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
// delay(10); // this speeds up the simulation
digitalRead(pushbutton, HIGH)
digitalWrite(red, LOW);
digitalWrite(blue, HIGH);
digitalWrite(purble, LOW);
delay(1000);
digitalRead(pushbutton, HIGH)
digitalWrite(blue, LOW);
digitalWrite(red, HIGH);
digitalWrite(purble, LOW);
delay(1000);
digitalRead(pushbutton, HIGH)
digitalWrite(purble, HIGH);
digitalWrite(blue, LOW);
digitalWrite(red, LOW);
delay(1000);
}
*/
/*
// Pin connections
int redPin = 9;
int greenPin = 10;
int bluePin = 11;
void setup() {
// Set pins as outputs
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
// Set the LED to Red
analogWrite(redPin, 255);
analogWrite(greenPin, 0);
analogWrite(bluePin, 0);
delay(1000);
// Set the LED to Green
analogWrite(redPin, 0);
analogWrite(greenPin, 255);
analogWrite(bluePin, 0);
delay(1000);
// Set the LED to Blue
analogWrite(redPin, 0);
analogWrite(greenPin, 0);
analogWrite(bluePin, 255);
delay(1000);
// Set the LED to Yellow
analogWrite(redPin, 255);
analogWrite(greenPin, 255);
analogWrite(bluePin, 0);
delay(1000);
// Set the LED to Cyan
analogWrite(redPin, 0);
analogWrite(greenPin, 255);
analogWrite(bluePin, 255);
delay(1000);
// Set the LED to Magenta
analogWrite(redPin, 255);
analogWrite(greenPin, 0);
analogWrite(bluePin, 255);
delay(1000);
// Set the LED to White
analogWrite(redPin, 255);
analogWrite(greenPin, 255);
analogWrite(bluePin, 255);
delay(1000);
// Turn off the LED
analogWrite(redPin, 0);
analogWrite(greenPin, 0);
analogWrite(bluePin, 0);
delay(1000);
}
*/
// #define pot 2
// #define led 4
// void setup(){
// Serial.begin(115200);
// }
// void loop(){
// int value = analogRead(pot);
// Serial.println(value);
// analogWrite(led , value);
// }