
Reading a Potentiometer — SIK Circuit 2
ညွှန်ကြားချက်များ
Parts & Introduction
Parts & Introduction
In this experiment you'll use a potentiometer (a variable resistor with a knob) to control how fast an LED blinks. This introduces analogRead() — reading voltage levels between 0 and 5V as values from 0 to 1023.
Parts Needed
- 1x Arduino Uno + USB cable
- 1x Breadboard
- 1x Potentiometer (10K)
- 1x LED (any color)
- 1x 330Ω Resistor
- 6x Jumper Wires
Materials for this step:
SparkFun Inventors Kit - V3.21 အစုံ
330 Ohm Resistor1 ခု
Jumper Wires6 ခုTools needed:
Hardware Hookup
Hardware Hookup
Wiring Instructions
- Place the potentiometer in the breadboard. It has three pins.
- Connect the left pin to GND and the right pin to 5V (or vice versa).
- Connect the middle pin (wiper) to Analog Pin A0.
- Place an LED in the breadboard. Connect the positive leg (longer) to Digital Pin 13.
- Connect the negative leg (shorter) through a 330Ω resistor to GND.
- Connect the 5V and GND rails on the breadboard to the Arduino.
Materials for this step:
330 Ohm Resistor1 ခု
Jumper Wires6 ခုArduino Code
Arduino Code
Open the Arduino IDE and upload the following sketch to your Arduino board.
Materials for this step:
Tools needed:
Test & Experiment
Test & Experiment
What You Should See
The LED blinks faster or slower as you turn the potentiometer knob. At one extreme it blinks very fast, at the other it blinks slowly.
Troubleshooting
- Sporadically working: The potentiometer pins may not be making good contact. Press it firmly into the breadboard.
- Not working: Make sure the wiper (middle pin) goes to Analog pin 0, not Digital pin 0.
- LED not lighting: LEDs only work in one direction. Flip it around.
Experiments to Try
- Open the Serial Monitor and print the
sensorValueto see the raw numbers (0-1023). - Use
map()to convert the sensor range to a brightness range and control LED brightness withanalogWrite().
ပစ္စည်းများ
7- $105.00
Related blueprints
Other builds that share materials, tools, or techniques with this one.






CC0 အများပိုင်
ဤအစီအစဉ်ကို CC0 အောက်တွင် ထုတ်ဝေထားသည်။ ခွင့်ပြုချက်မလိုဘဲ ကူးယူ၊ ပြင်ဆင်၊ ဖြန့်ဝေ နှင့် အသုံးပြုနိုင်သည်။
အစီအစဉ်မှတစ်ဆင့် ကုန်ပစ္စည်းများဝယ်ယူ၍ ဖန်တီးသူကို ပံ့ပိုးပါ ဖန်တီးသူ ကော်မရှင် ရောင်းချသူက သတ်မှတ်သည်၊ သို့မဟုတ် ဤအစီအစဉ်၏ ဗားရှင်းအသစ်ဖန်တီး၍ ဝင်ငွေခွဲဝေရန် သင့်အစီအစဉ်တွင် ချိတ်ဆက်မှုအဖြစ် ထည့်သွင်းပါ။