Hello everyone!! Welcome to this post on Arduino LED Projects!!
Need a short introduction to what the Arduino is then click on LINK
Check out the breadboard intro right HERE
Demo:
This is what my project looked like:
(Sorry you can maybe hear my younger brother yelling in the background )
Things Required:
- Arduino UNO
- Breadboard
- Jumper Wires
- Tilt Switch
- LED
- 220 ohm resistor
- Arduino IDE on computer
Functions used:
- digitalWrite()
- digitalRead()
- pinMode()
Reference Material:
So I made this one on my own. It’s a very simple project and you can refer to this video (LINK).
Code:
View on/ Download from : (LINK)
int redled=8;
int tilt_switch=2;
void setup() {
// put your setup code here, to run once:
pinMode(redled, OUTPUT);
pinMode(tilt_switch, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(tilt_switch)==HIGH){
digitalWrite(redled, HIGH);
} else {
digitalWrite(redled, LOW);
}
}
Stay Tuned for upcoming posts on Arduino Projects! We’re on the basic newbie projects right now and slowly, gradually move on to those cool, ultra techy projects!! Want to be the first to know when a new and amazing post comes up?? Then feel free to subscribe!
Happy Learning!!
