유은제gledel
Published © GPL3+

Analog Input

I did a project on analog inputs.

BeginnerShowcase (no instructions)1 hour648
Analog Input

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Breadboard (generic)
Breadboard (generic)
×1
LED (generic)
LED (generic)
×1
Resistor 221 ohm
Resistor 221 ohm
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×7

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

schemetis of amalog input

Code

code of analog input

EJS
int led_pin = 11;
int input_value;
int brightess:

void setup(){
pinMode(led_pin, OUTPUT);
Serial.begin(9600);
}

void loop(){
input_value = analogRead(A0);
brightness = map(input_value, 0, 1023, 0, 255):
analogWrite(led_pin, brightness);
Serial.println("input_value : " + String(input_value) + " , brightness : " + String(brightness));
}

Credits

유은제
15 projects • 13 followers
Hello :-) I'm a high school student in South Korea.
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.