アート
美容とウェルネス
工芸
文化と歴史
エンターテインメント
環境
食品と飲料
リバースエンジニアリング
科学
スポーツ
テクノロジー
ウェアラブル

Using a Flex Sensor — SIK Circuit 9
Use a flex sensor to control a servo motor. Bend the sensor to move the servo — combining analog input with motor control for gesture-based interaction.
手順
1
1
Parts & Introduction
Parts & Introduction
A flex sensor changes resistance when bent. Combined with the servo from Circuit 8, you can create gesture-based controls — bend the sensor to move the servo. This combines analogRead() with the Servo library.
Parts Needed
- 1x Arduino Uno + USB cable
- 1x Breadboard
- 1x Flex Sensor
- 1x Servo Motor
- 1x 10KΩ Resistor
- 11x Jumper Wires
このステップの材料:
SparkFun Inventors Kit - V3.21 キットArduino Uno R31 個
Breadboard1 個
Flex Sensor1 個Servo Motor1 個
10K Ohm Resistor1 個
Jumper Wires7 個必要な工具:
Computer with Arduino IDE
2
2
Hardware Hookup
Hardware Hookup
Wiring Instructions
Flex Sensor
- Connect one pin of the flex sensor to 5V.
- Connect the other pin to Analog Pin A0.
- Connect a 10K resistor from Analog Pin A0 to GND (voltage divider).
Servo
- Connect Red wire to 5V.
- Connect Black wire to GND.
- Connect White wire to Digital Pin 9.
このステップの材料:
Flex Sensor1 個Servo Motor1 個
10K Ohm Resistor1 個Breadboard1 個
Jumper Wires7 個3
3
Arduino Code
Arduino Code
Open the Arduino IDE and upload the following sketch to your Arduino board.
flex_sensor.inoarduino
このステップの材料:
Arduino Uno R31 個
必要な工具:
Computer with Arduino IDE
4
4
Test & Experiment
Test & Experiment
What You Should See
The servo moves in response to bending the flex sensor. Open the Serial Monitor to see both the raw sensor value and the mapped servo position.
Troubleshooting
- Servo not moving: Check servo wiring — easy to plug in backwards.
- Sensor only works one way: The flex sensor bends in one direction. The striped side should face outward on a convex curve.
- Limited range: Adjust the
map()range values (600, 900) to match your sensor's actual readings from the Serial Monitor.
Experiments to Try
- Build a "robot finger" that mimics your finger bending.
- Replace the servo with an LED and control brightness by bending.
材料
7- ¥164
- プレースホルダー
見積もり合計
¥239CC0 パブリックドメイン
このブループリントはCC0で公開されています。許可を求めずに、自由にコピー、修正、配布、あらゆる目的で使用できます。
メイカーを応援するには、ブループリント経由で製品を購入してください。メイカーには メイカーコミッション がベンダーにより設定されています。または、このブループリントの新しいイテレーションを作成し、自分のブループリントにコネクションとして含めて収益を共有できます。