Sign language with flex sensors

hello,
i'm working on a project for deaf and dumb people.
i'm having flex sensor which is connected to arduino and a lcd display 16x2 connected to arduino. too
when i bend the flex a flex sensor which is gven as an input A0 to the arduino , a corresponding message should be displayed on the lcd.
for example : if a flex sensor is bent, a message saying " food " should display on the lcd.
i'm having difficulty in creating a code for that.can anyone help me out with this? please.

Post a link to the flex sensor you are using for this project.
Are you intending that the arduino can display multiple messages depending on the output of the flex sensor ?

no, a single flex sensor on bending should display a text on lcd display .
one value for single flex sensor

In principle, you incorporate each flex sensor in a voltage divider across the power rails with the centre tap connected to an analog pin.
In your program, you poll each analog pin in turn and watch for a change in voltage level since the last poll.
If there is a change, you write a message to the display.
If you use an Arduino Nano, you get 8 analog pins. If you use a Uno you get 6. If these are not enough, you can get an external ADC chip.

yes see what actualyy, flex sensors having two pins.
one i have given as an input and second to the gnd and side by side an lcd connection is also attached with the arduino.
i bit confused with this totallt.
i have written a code but it doesnt work can u helpme out.

#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
int flexPin1 = A0;
int value1;
void setup() {
// put your setup code here, to run once:
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print(“Sign Language”);
Serial.begin(9600);
delay(200);
}

void loop() {
// put your main code here, to run repeatedly:
value1 = analogRead(flexPin1);
Serial.print(value1);
value1 = map(value1, 760, 950, 0, 255);
if(value1 > 80)
{
Serial.print(“Food”);
lcd.clear();
digitalWrite(6, HIGH);
lcd.print(“Foods”);
delay(500);
}

}

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

It is important we see how you have wired your flex sensors.

Have you got the LCD display working?

Thanks… Tom… :slight_smile:

. . . and this. Is this the Flex Sensor you are using ? Flex Sensor 4.5" - SEN-08606 - SparkFun Electronics

yes, lcd connecctions are quite working well.
my flex sensor one pin is connected with gnd of arduino and another is as a input to the arduino

here is the circuit

OP’s picture:

e15bca371982bc64524fcd30282620f0680ad26e.jpg

The wiring diagram is (probably) incorrect. I’ve tried to ask 2 times what sensor is being used.
This is the correct wiring diagram for a Sparkfun sensor.

yes i told you its a flex sensor 2.2 inches one.
yes i have connected the same way the link which provided the connections.
the circuit i drew is wrong. sry.

shrikant_arts:
no, a single flex sensor on bending should display a text on lcd display .
one value for single flex sensor

It seems like a doable project, but the programming will be complex.

The sketch you posted (without

[code]tags [/code]

!!) would seem to work for a small number of words formed on a single finger. The range from 760 to 950 will limit you to ten or so unique positions (use an opamp to stretch this range to the full 10 bits Arduino can handle.) Some "fuzzy logic" should help compensate for slight variations. Best would be a sensor for every articulated joint, at least a dozen. Use arrays to translate between words and series of flex sensor values.

Look very carefully at the link for the wiring diagram of the Sparkfun Flex sensor.
There is a 47K Ohm resistor. between ground and the analog pin. Look also at what part of the sensor is connected to 5 Volt. The sensor together with the resistor form a voltage divider.

connecions are pretty good.code isn't working

You've claimed that the LCD code works so my suggestion is to create a new sketch based purely on the Sparkfun code example and get that working. After that, join the your LCD code to the working example.

yes Sparkfun code is working but with my code it isnt?

What output do you get from the following Serial.print() statement ?

Serial.print(value1);

nothing but a message " food ",that occurs in the serial monitor too and on lcd too.

If that is not what you are expecting, then post your latest code (between code tags) and an updated wiring diagram and a description of what you are expecting to see.

Hi,
Can you try this code?
Tell us what the LCD displays when you leave the flex sensor unflexed and then flexed.

Tell us what the IDE monitor displays when you leave the flex sensor unflexed and then flexed.

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int flexPin1 = A0;
int value1;
void setup() {
  // put your setup code here, to run once:
  lcd.begin(16, 2);
  lcd.setCursor(0, 0);
  lcd.print("Sign Language");
  Serial.begin(9600);
  delay(200);
}

void loop() {
  // put your main code here, to run repeatedly:
  value1 = analogRead(flexPin1);
  Serial.print(value1);
  value1 = map(value1, 760, 950, 0, 255);
  if (value1 > 80)
  {
    lcd.setCursor(0, 0);
    lcd.print("             ");
    lcd.setCursor(0, 0);
    lcd.print("Foods");
    digitalWrite(6, HIGH);
    Serial.println("   Foods");
    delay(500);
  }
  else
  {
    lcd.setCursor(0, 0);
    lcd.print("             ");
    lcd.setCursor(0, 0);
    lcd.print("Sign Language");
    lcd.clear();
    digitalWrite(6, LOW);
    Serial.println("   Sign Language");
    delay(500);
  }

}

Do you have a DMM to measure some voltages?
Can you post a picture of your project please?

Thanks… Tom… :slight_smile: