An embedded prototype that uses a Teensy, flex sensors, an Adafruit BNO055 inertial measurement unit (IMU), and an HC-05 Bluetooth module to recognize simple hand movements. Recognized phrases are sent over Bluetooth to a mobile application, where they can be displayed or converted to speech.
Project resources:
| File | Purpose |
|---|---|
Teensyduino_Code.c |
Demonstration sketch that combines one flex sensor with BNO055 orientation data and sends two phrases over Bluetooth. |
Extended_code.c |
Flex-sensor diagnostic sketch for nine channels. It prints raw readings and estimated joint-bending angles to the USB serial monitor. |
These files are alternative sketches. Upload only one of them at a time.
The prototype is designed to place the electronics on the back of a glove while leaving the fingers free to move.
- Teensy board with the Arduino/Teensyduino toolchain
- HC-05 Bluetooth serial module
- Adafruit BNO055 breakout board
- Flex sensors and suitable voltage-divider resistors
- Glove, hookup wire, and a regulated power source
Teensyduino_Code.c reads its demonstration flex sensor on analog pin 34 and creates a Bluetooth serial port with SoftwareSerial(0, 1), where the constructor arguments are RX and TX respectively.
Extended_code.c uses the following analog pins:
| Signal | Teensy analog pin |
|---|---|
| Index | 28 |
| Index knuckle | 27 |
| Middle | 26 |
| Middle knuckle | 31 |
| Ring | 30 |
| Ring knuckle | 29 |
| Pinky | 35 |
| Thumb | 34 |
| Thumb knuckle | 36 |
The BNO055 communicates over I2C through the Teensy Wire pins. Confirm the board-specific SDA/SCL pins and voltage requirements in the Teensy and BNO055 documentation before wiring the circuit. Cross-connect serial signals correctly: module TX to Teensy RX and module RX to Teensy TX, with compatible logic levels.
- Install the Arduino IDE and the Teensyduino support package.
- Select the exact Teensy model and its USB/CPU settings in the Arduino IDE.
- Install these libraries through the Arduino Library Manager:
SoftwareSerialAdafruit BNO055Adafruit Unified Sensor
- Open the desired
.cfile as an Arduino sketch. Arduino sketches are normally saved as.ino; if the IDE does not recognize the.cfile as a sketch, copy it into a sketch folder and rename the copy to match the folder name with an.inoextension. - Select the Teensy board and port, compile, and upload.
The BNO055 sketch uses a serial monitor speed of 115200 for USB debugging and configures the HC-05 at 9600 baud. The extended diagnostic sketch uses 9600 baud for its serial monitor.
Teensyduino_Code.c performs the following loop:
- Reads the flex sensor on pin
34. - When the reading is greater than
950, sendsDrink waterover Bluetooth. - Reads the BNO055 orientation event.
- When
event.orientation.yis less than-10, sendsHelp Me!!over Bluetooth. - Prints sensor activity and orientation readings to the USB serial monitor.
The threshold values are starting points, not universal calibration values. Flex sensors vary by construction, resistor value, placement, and glove fit. Measure the relaxed and bent values for the actual glove before changing the thresholds. The current sketch also includes delays, so repeated phrases are intentionally slow and the gesture response is not continuous.
Extended_code.c reads nine sensors and maps each raw analog value to an estimated range of 0 to 90 degrees. It prints two angle lines followed by raw sensor readings once per second:
FingerDegrees: <index> <middle> <ring> <pinky> <thumb>
KnuckleDegrees: <index> <middle> <ring> <thumb>
FlexSensorBending(raw)
Index: <raw value>
...
The calibration endpoints currently stored in the sketch are:
| Channel | Raw range mapped to 0-90 degrees |
|---|---|
| Middle knuckle | 490-662 |
| Pinky | 578-720 |
| Ring knuckle | 500-697 |
| Thumb knuckle | 488-600 |
| Thumb | 590-662 |
| Index knuckle | 542-705 |
| Middle | 539-680 |
| Index | 503-708 |
| Ring | 503-752 |
To recalibrate, record each sensor's raw value in its relaxed and fully bent positions, then replace the corresponding pair in flexDegCal. The Arduino map function does not clamp values, so readings outside a calibration range can produce values below 0 or above 90.
Pair the HC-05 with the receiving mobile application and configure the application for a Bluetooth serial connection. The demonstration sketch sends plain text without a newline using BTserial.write, so the application should treat Drink water and Help Me!! as message tokens or add its own framing. The repository does not include the mobile application, speech engine, or a formal message protocol.
- BNO055 not detected: Check power, ground, SDA/SCL wiring, and the I2C address. The sketch stops in
setup()ifbno.begin()fails. - No Bluetooth text: Check HC-05 pairing, RX/TX crossover, common ground, the selected serial pins, and the module baud rate (
9600). - Flex values are unstable: Use a consistent voltage divider, inspect connections, keep sensor wiring secure, and average or filter readings before setting gesture thresholds.
- Angles look wrong: Recalibrate the raw endpoints for the specific sensors and verify that the sensor order matches the pin table.
- Upload or compile problems: Confirm the Teensy board is selected and use an
.inocopy if the Arduino IDE does not treat the.cfile as a sketch.
This is a proof-of-concept rather than a complete sign-language translator. It currently demonstrates two phrases and reports nine flex-sensor channels; it does not provide a trained sign classifier, language model, mobile source code, audio output implementation, filtering, or message framing. Natural extensions include collecting labeled gesture data, adding debouncing and sensor filtering, defining a framed Bluetooth protocol, and mapping additional gesture combinations to phrases.
Use a regulated supply and verify the voltage levels for the Teensy, BNO055 breakout, and HC-05 before connecting them. Do not wear the glove while exposed wiring, loose connections, or excessive heat is present.