Skip to content

Vision Voice Development

Week01

Visualize

To clearly visualize my final project, I have used canva to jot down the ideas and features of my project.

image

Here is the link to my canva for reference

Circuit

image

Here is the link to detailed connection.

Week02 - Cardboard Prototyping.

Today, our local instructor guided us through the process of cardboard prototyping, which was both fun and interesting. Afterward, we were given two hours to complete our first prototype for our final projects.

Hero Shot

image

I started by making the glove and attaching the flex sensors.

image

Next, I researched every component to find their specific dimensions, such as thickness and height. I carefully drew these dimensions onto the cardboard and cut them out using blades and scissors.

image

After that I estimated the size of the casing and drew on the cardboard.

image

Once the pieces were ready, I assembled everything to create the final structure.

image

Key Takeaways( Things I need to work on here after.)

Cloth Glove Fabrication: Figuring out how to transition the design from cardboard to actual fabric.

Sensor Integration: Determining the best method to securely attach the flex sensors to the cloth glove.

Casing Design & Wire Management: Planning the internal layout of the casing to fit the PCB and organize wires neatly.

Accessibility Mechanism: Designing a lid system (likely using screws) that allows you to easily open the casing for maintenance.

Material Constraints: Accounting for the specific thickness of your final materials and hardware (like screw sizes) in your design

Future Plans

Here after I plan to make a working prototype with the cardboard and test my programs and connections.

*Thank You

Week04

Simulations and Prototyping

I wanted to make something for my final project. I wanted to use the XIAO ESP32C3 board and display text when a certain value is reached from the flex sensor. This will help me understand the flex sensor values better, which is a really important component for my final project.

I gathered all the components and made the circuit.

image

image

After that I downloaded the following libraries for the OLED display:

Adafruit_GFX.h Adafruit_SSD1306.h

image

I then added the XIAO ESP32C3 board to the Arduino IDE. This is the link: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json

I added the link to the preference URL tab. Then I downloaded the ESP32 from the Board Manager.

image

image

After carefully installing all the libraries and components, I uploaded the code to the XIAO ESP32C3 board.

image

image

Code Explaination

After that I wrote the code. Note that the code wasn't entirely written by me. It was written with the help of Claude AI.

Libraries Used

I used three libraries for this project:

  • Wire.h — handles I2C communication between the microcontroller and the OLED
  • Adafruit_GFX.h — a base graphics library for drawing text and shapes
  • Adafruit_SSD1306.h — specifically for controlling the SSD1306 OLED display

How the Code Works

1. Defining the Screen and Pin

#define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 #define OLED_RESET -1

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

#define FLEX_PIN D0

This part sets up the OLED display size (128×64 pixels) and tells the code which pin the flex sensor is connected to.
The OLED_RESET -1 means I'm not using a separate reset pin.

2. Setting the Flex Sensor Ranges

#define IDLE_MIN 350 #define HELLO_MIN 280 #define VISION_MIN 200 #define THANKS_MIN 110

This was probably the most important part I had to figure out.
The flex sensor gives different analog values depending on how much it's bent.

I tested it many times using the Serial Monitor and wrote down the ranges:

Flex Value Range What it Shows
350 – 360 Idle (not bent)
280 – 345 "HELLO WORLD"
200 – 275 "I AM VISION VOICE"
110 – 195 "THANK YOU"

I stored the phrases in an array so I can call them easily by index number:

const char* words[] = { "HELLO WORLD", "I AM VISION VOICE", "THANK YOU" };

3. The displayWord() Function

void displayWord(const char* word) { display.clearDisplay(); display.setTextColor(SSD1306_WHITE); display.setTextWrap(true);

int textSize = (strlen(word) > 9) ? 1 : 2;
...

}

This function is what actually puts text on the screen.

I added some simple logic here:

  • If the phrase is longer than 9 characters, it uses a smaller text size (1) so it fits.
  • Otherwise it uses size 2, which looks bigger and cleaner.

I also centered the text on the screen using getTextBounds():

int yPos = (SCREEN_HEIGHT - h) / 2; int xPos = (SCREEN_WIDTH - w) / 2;

4. The Setup Function

void setup() { Serial.begin(115200); pinMode(FLEX_PIN, INPUT);

display.println("VISION");
display.println("VOICE");
delay(2000);

displayIdle();

}

When the board first powers on:

  1. It shows a startup screen saying "VISION VOICE" for 2 seconds
  2. Then it switches to the idle message telling the user to bend the sensor

5. The Main Loop

void loop() { int flexValue = analogRead(FLEX_PIN);

if (currentState != lastState) {
  lastState = currentState;
}

delay(100);

}

The loop reads the flex sensor value every 100 milliseconds.

Then it checks which range the value falls into and sets a currentState.

Important Improvement

I made the display update only when the state changes:

  • Prevents flickering
  • Makes the output much smoother

Results

image