
Reading a Soft Potentiometer — SIK Circuit 10
निर्देशनहरू
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
यस चरणका सामग्री:
SparkFun Inventor's Kit - V3.21 किटचाहिने औजार:
Computer with 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.
यस चरणका सामग्री:
RGB LED (Common Cathode)1 टुक्रा
Breadboard1 टुक्रा
Jumper Wires8 टुक्राArduino Code
Arduino Code
Open the Arduino IDE and upload the following sketch to your Arduino board.
यस चरणका सामग्री:
Arduino Uno R31 टुक्राचाहिने औजार:
Computer with 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.
सामग्री
8- SparkFun Inventor's Kit - V3.210% कमिसन1 किट$108.84
- प्लेसहोल्डर
- देखि$9.76
- देखि$4.27
- देखि$27.80
- 1 टुक्राप्लेसहोल्डर
- 3 टुक्राप्लेसहोल्डर
- देखि$1.22
आवश्यक उपकरणहरू
1- प्लेसहोल्डर
CC0 सार्वजनिक डोमेन
यो ब्लुप्रिन्ट CC0 अन्तर्गत जारी गरिएको छ। तपाईं अनुमति नसोधी प्रतिलिपि, परिमार्जन, वितरण र प्रयोग गर्न सक्नुहुन्छ।
ब्लुप्रिन्ट मार्फत उत्पादनहरू किनेर सिर्जनाकर्तालाई सहयोग गर्नुहोस् सिर्जनाकर्ता कमिसन विक्रेताले तोकेको, वा यो ब्लुप्रिन्टको नयाँ संस्करण बनाउनुहोस् र आम्दानी बाँड्न आफ्नो ब्लुप्रिन्टमा जडानको रूपमा समावेश गर्नुहोस्।