Basic Arduino Slideswitch in TInkerCAD

Published: 09 April 2020
on channel: Mr. Spooner
21,962
193

Basic Arduino slideswitch demo in TinkerCAD with an LED.

//-----Code-----

int ledPin = 9;
int switchPin = 7;

void setup()
{
pinMode(ledPin, OUTPUT);
pinMode(switchPin, INPUT);

Serial.begin(9600);
}

void loop()
{
if (digitalRead(switchPin)){
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}

}


Watch video Basic Arduino Slideswitch in TInkerCAD online without registration, duration hours minute second in high quality. This video was added by user Mr. Spooner 09 April 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 21,962 once and liked it 193 people.