how to program sign language fingerspelling using flex sensor?

Hi! Can you help me how to program the alphabet letters in American Sign Language using flex? I have already started to code but my problem is letter a and c is the same in recognizing. T_T Please help me :frowning: thankyouuuuuuuuu

int flexPin1 = A0;
int flexPin2 = A1;
int flexPin3 = A2;
int flexPin4 = A3;
int flexPin5 = A4;
int thumb;
int index;
int middle;
int ring;
int pinky;
int thumb1;
int index1;
int middle1;
int ring1;
int pinky1;
//int thumb2;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(flexPin1, INPUT);
pinMode(flexPin2, INPUT);
pinMode(flexPin3, INPUT);
pinMode(flexPin4, INPUT);
pinMode(flexPin5, INPUT);

}

void loop() {
// put your main code here, to run repeatedly:
int thumb = analogRead(flexPin1);
int index = analogRead(flexPin2);
int middle = analogRead(flexPin3);
int ring = analogRead(flexPin4);
int pinky = analogRead(flexPin5);

Serial.print("Thumb: ");
Serial.println(thumb);
thumb1 = map(thumb, 62, 220, 0, 100);
thumb1 = constrain(thumb1, 0, 100);
//Serial.print("Thumb Constrain Value: ");
//Serial.println(thumb2);
Serial.print("Thumb Mapped Value: ");
Serial.println(thumb1);
Serial.print("Index: ");
Serial.println(index);
index1 = map(index, 0, 272, 0, 255);
index1 = constrain(index1, 0, 255);
Serial.print("Index Mapped Value: ");
Serial.println(index1);
Serial.print(β€œMiddle:”);
Serial.println(middle);
middle1 = map(middle, 75, 190, 0, 100);
middle1 = constrain(middle1, 0, 100);
Serial.print("Middle Mapped Value: ");
Serial.println(middle1);
Serial.print("Ring: ");
Serial.println(ring);
ring1 = map(ring, 80, 249, 0, 100);
ring1 = constrain(ring1, 0, 100);
Serial.print("Ring Mapped Value: ");
Serial.println(ring1);
Serial.print("Pinky: ");
Serial.println(pinky);
pinky1 = map(pinky, 95, 282, 0, 100);
pinky1 = constrain(pinky1, 0, 100);
Serial.print("Pinky Mapped Value: ");
Serial.println(pinky1);

if (thumb1>=50 && thumb1<=80 && index1==0 && middle1>=0 && middle1<=36 && ring1>=0 && ring1<= 25 && pinky1>=0 && pinky1<= 55)
{ Serial.println(β€œA”); }
else if (thumb1>=20 && thumb1<=45 && index1>=0 && index1<=220 && middle1>=70 && middle1<=105 && ring1>=80 && ring1<= 105 && pinky1>=0 && pinky1<= 90)
{ Serial.println(β€œB”); }

So you are saying your flex sensor (whatever that is) can't tell the difference between a and c? I assume e, m, n s, and t are going to be problems then as well.

Sounds to me like you need a different sensor or a better way to decipher the sensor input you have.

I assume these mean something?

thumb1 = map(thumb, 62, 220, 0, 100);
middle1 = map(middle, 75, 190, 0, 100);
etc

For a disambiguation you need more detailed data, e.g. more flex pins. Also consider that various "speakers" can produce different flex values for the same letter or word, i.e. your program should contain separate training and execution phases. AI may help, but most probably requires a big Arduino for the learning phase.

Please edit your post to add code tags.

This project would be a good case for Machine Learning and a PC. You need a large database for training, though.

Excellent, free, well written on line textbook on machine learning.