const int buttonPin = 2;
const int basePin = 3;
void setup() {
pinMode(buttonPin, INPUT_PULLUP);
pinMode(basePin, OUTPUT);
}
void loop() {
digitalWrite(basePin, digitalRead(buttonPin) == LOW ? HIGH : LOW);
}
const int buttonPin = 2;
const int basePin = 3;
void setup() {
pinMode(buttonPin, INPUT_PULLUP);
pinMode(basePin, OUTPUT);
}
void loop() {
digitalWrite(basePin, digitalRead(buttonPin) == LOW ? HIGH : LOW);
}