Hackster is hosting Impact Spotlights: Industrial Automation. Watch the stream live on Thursday!Hackster is hosting Impact Spotlights: Industrial Automation. Stream on Thursday!
yaeseonggledel
Published © GPL3+

Fab Lab Academy Activity

I used a potentiometer to adjust the brightness of the led.

BeginnerShowcase (no instructions)1 hour758
Fab Lab Academy Activity

Things used in this project

Hardware components

Jumper wires (generic)
Jumper wires (generic)
×1
Arduino UNO
Arduino UNO
×1
LED (generic)
LED (generic)
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
Resistor 330 ohm
Resistor 330 ohm
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

led

control LED

Code

LED switchi control

Arduino
int led_pin = 13;
int sw_pin1= 2;
int sw_pin2= 8;
int sw1_value;
int sw2_value;



void setup() {
pinMode(13,OUTPUT);
pinMode(2,INPUT);
pinMode(8,INPUT);

}

void loop() {
// put your main code here, to run repeatedly:
sw1_value=digitalRead(2);
sw2_value=digitalRead(8);
if(sw1_value==LOW)
{digitalWrite(13,HIGH);}
if(sw2_value==HIGH)
{digitalWrite(13,HIGH);}
digitalWrite(13,LOW);


}
No preview (download only).

Credits

yaeseong
7 projects • 7 followers
Korean High School Student who wants to expand his knowledge of the World
Contact
gledel
100 projects • 116 followers
Looking back on my childhood, I was happy when I was making something and I was proud of myself. "Making is instinct!"
Contact

Comments

Please log in or sign up to comment.