艺术
美容与健康
工艺
文化与历史
娱乐
环境
食品与饮料
逆向工程
科学
体育
技术
可穿戴设备

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- $105.00
- 占位符
估计总额
$163.00Related blueprints
Other builds that share materials, tools, or techniques with this one.

Reading a Temperature Sensor — SIK Circuit 7electronics/electromech1 shared material

Driving a Servo Motor — SIK Circuit 8electronics/electromech1 shared material

Using Relays — SIK Circuit 13electronics/electromech1 shared material

Driving a Motor — SIK Circuit 12electronics/electromech1 shared material

Flex Sensor Glove — Control 5 Servo Motors with Hand Gestureselectronics/electromech1 shared material

Using a Shift Register — SIK Circuit 14electronics/active1 shared material
CC0 公共领域
此蓝图以 CC0 协议发布。你可以自由复制、修改、分发和使用此作品,无需征得许可。
通过购买蓝图中的产品支持创客,他们将获得 创客佣金 (由供应商设定),或创建此蓝图的新版本并将其作为连接包含在你自己的蓝图中以分享收入。