Kenpoca_Dias540ramiromartins
Published © GPL3+

Flashing LED

Easy project to make a flashing LED with just a few lines of code and a potentiomenter

BeginnerProtip1,294
Flashing LED

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
You can use any other board if you want !!!
×1
Breadboard (generic)
Breadboard (generic)
×1
LED (generic)
LED (generic)
×1
Resistor 330 ohm
Resistor 330 ohm
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
I used one with 22K Ohms
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Fritzing
Tinkercad
Autodesk Tinkercad

Hand tools and fabrication machines

Computer

Story

Read more

Schematics

LED Blinking

Code

Flashing LED

Arduino
// LED Intermitente c/ Potenciómetro
// Miguel Dias - ESGC 2018
 
const int Potenciometro = A5;
const int Led = 13;
int ValorPoten = 0;
 
void setup() {
pinMode(Led, OUTPUT);
}
 
void loop() {
ValorPoten = analogRead(Potenciometro);
digitalWrite(Led, HIGH);
delay(ValorPoten);
digitalWrite(Led, LOW);
delay(ValorPoten);
}

Credits

Kenpoca_Dias

Kenpoca_Dias

2 projects • 1 follower
540ramiromartins

540ramiromartins

18 projects • 13 followers

Comments