
Reading a Soft Potentiometer — SIK Circuit 10
Ìlànà
Parts & Introduction
Parts & Introduction
A soft potentiometer is a thin, flexible strip that acts as a variable resistor based on where you press. Combined with an RGB LED, you can create an intuitive color picker — slide your finger to change colors!
Parts Needed
- 1x Arduino Uno + USB cable
- 1x Breadboard
- 1x Soft Potentiometer
- 1x RGB LED (Common Cathode)
- 3x 330Ω Resistors
- 1x 10KΩ Resistor (pull-down)
- 9x Jumper Wires
Àwọn ohun èlò fún ìgbésẹ̀ yìí:
SparkFun Inventor's Kit - V3.21 ohun èlòÀwọn irinṣẹ́ tí a nílò:
Kọ̀ǹpútà Tí Ó Ní Arduino IDEHardware Hookup
Hardware Hookup
Wiring Instructions
Soft Potentiometer
- Connect the middle pin to Analog Pin A0.
- Connect one side pin to 5V.
- Connect the other side pin to GND.
- Add a 10K pull-down resistor from Analog Pin A0 to GND.
RGB LED (pin order from flat edge: Red, GND, Green, Blue)
- Connect Red through 330Ω resistor to Pin 9.
- Connect GND (longest pin) to GND rail.
- Connect Green through 330Ω resistor to Pin 10.
- Connect Blue through 330Ω resistor to Pin 11.
Àwọn ohun èlò fún ìgbésẹ̀ yìí:
Okùn LED RGB 5050 (àìlé fi àdírẹ́sì)1 ẹyọ
Okùn Ìsopọ̀8 ẹyọÀwọn irinṣẹ́ tí a nílò:
Pátákó ÀdánwòArduino Code
Arduino Code
Open the Arduino IDE and upload the following sketch to your Arduino board.
Àwọn ohun èlò fún ìgbésẹ̀ yìí:
Arduino Uno R31 ẹyọÀwọn irinṣẹ́ tí a nílò:
Kọ̀ǹpútà Tí Ó Ní Arduino IDETest & Experiment
Test & Experiment
What You Should See
The RGB LED changes color as you slide your finger along the soft potentiometer strip. The color smoothly transitions through the spectrum: red → green → blue → red.
Troubleshooting
- LED dark or wrong color: Four pins close together are easy to misplace. Verify each RGB LED connection.
- Bizarre color jumps: Pressing the soft pot in multiple spots simultaneously gives unpredictable results. Use one finger.
Experiments to Try
- Add Serial output to see the raw sensor values as you slide.
- Map the soft pot to servo position instead of color.
Àwọn ohun-èlò
7- 1 ohun èlò$108.26
- Àyè
- Àyè
- 1 ẹyọÀyè
- 3 ẹyọÀyè
- Àyè
Àwọn irinṣẹ́ tó nílò
2- 1 vendor sell this, none ship to you yetÀyè
CC0 Àgbègbè Gbogbogbò
Blueprint yìí ti jáde lábẹ́ CC0. O lè ṣe àdàkọ, yí padà, pín, àti lò láìsí ìyọ̀ǹda.
Ṣàtìlẹ́yìn Olùṣẹ́dá nípa rírà àwọn ọjà nipasẹ̀ Blueprint wọn Ẹ̀san Olùṣẹ́dá tí àwọn Olùtajà gbé kalẹ̀, tàbí ṣẹ̀dá àtúnṣe tuntun ti Blueprint yìí kí o sì fi sínú Blueprint rẹ gẹ́gẹ́ bí ìsopọ̀ láti pín owó-wíwọlé.