Hello everyone!! Welcome to this post on Arduino Projects!!
Need a short introduction to what the Arduino is then click on LINK
Check out the breadboard intro right HERE
So here we’ll start with using Serial monitor to tell LED the number of times it has to blink
Demo:
Here is what my project looks like:
Things Required:
- Arduino UNO
- USB AB cable
- LED (any color)
- Breadboard
- 220 ohm resistor
- Arduino IDE on computer
- jumper wires
Functions used:
Video Tutorial:
Here’s the video I used for reference: (LINK)
Code:
String msg="How many blinks?";
int blinks;
int led=8;
int dt=500;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(led, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(msg);
while(Serial.available()==0){
}
blinks=Serial.parseInt();
for(int i=1; i<=blinks; i++){
digitalWrite(led, HIGH);
delay(dt);
digitalWrite(led, LOW);
delay(dt);
}
}
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!!
