Devices & Components
Arduino Uno Rev3
Breadboard (generic)
Jumper wires (generic)
Switch Actuator, Head for spring return push-button
5 mm LED: Green
Project description
Code
Code
c_cpp
Here is the project code
1int swt = 13; 2int led = 12; 3void setup() 4{ 5 pinMode(13, INPUT); 6 pinMode(12, OUTPUT); 7} 8 9void loop() 10{ 11 12 if(digitalRead(swt) == 1) 13 { 14 digitalWrite(led, HIGH); 15 } 16 else{ 17 digitalWrite(led, LOW); 18 } 19 20}
Downloadable files
circuit diagram
Here is the circuit design
circuit diagram

circuit diagram
Here is the circuit design
circuit diagram

Comments
Only logged in users can leave comments