hey buddy.
the code isnot working, here is the screenshot of serial monitor what it is getting displayed.
and here are my connection of lcd and flexsensor.
pin 1 of lcd-GND
pin2-5v
pin3-connected with middle potentiometer
pin4-12
pin5-gnd
pin6-11
d7-2,
d6-3
d5-4
d4-5
15-5v
16-gnd
flex sensor connnected wit 10 k reesistor:
one pin goes to 5v and other pin goes to A0 and one for connection s shown in sparkfun.
now when i run the program.nothing displays on lcd just getting displayed on serial monitor only
bro
now when i run this code,
when i bend the flexsensor
the message food vanishes from the lcd
and whn i keep the flexsensor straight food message appears on lcd.
as i bend the message goes and whne i pull it off the straight the message "Food" comesback
Here how to use a really cool feature of this website:
Edit your last post by typing "[code]" right before your code lines and then "[/code]" right after it. All of your code will be put into a scrolling frame that uses a monospaced font. The code can easily be copied whole, and doesn't take up nearly so much room!
How does the behaviour of your code differ from your expectations ?
Can you explain why you have chosen to use 3 sensors for 3 messages. Why not just one and depending on the range returned by analogRead(), chose the appropriate message to display ?
yes i have choosen 3 because, i need to show a sign language demonstration for deaf and dumb people, so istead of 5 flexsensors i have used 3 to show 3 demostration messages for the people who cannot speak.
beofre that i was checking whether its working or not,
then i hv started with 3 so getting problem
You seem to have a problem expressing yourself clearly and answering questions when these are asked. It is also not clear, even looking at the code what you are trying to do in detail.
Anyway, maybe you can answer these questions:
For how many seconds must a user hold the flex sensor in a particular position before it determines what message the user wants to have displayed ?
Once it is clear what message the user wants displayed, for how many seconds must the message remain in the display ?
If more than one flex sensor is activated, which should take priority ?
Also:
You should have debug (Serial.print) statements in your code to cover all conditions so you can see what is happening. For example, what happens if switch(range2) returns a 2 or even a 3 ? . You wont see that.