View Single Post
Old 06-10-2015, 04:51 AM   #55 (permalink)
Theitguy
EcoModding Lurker
 
Join Date: Jun 2015
Location: Australia
Posts: 18
Thanks: 3
Thanked 0 Times in 0 Posts
its simply not displaying anything (I.E. the led display is left blank) im thinking that my button resistor values may be different to what you had. im using a freetronics LCD shield with resistor values as below. how do you have the buttons set up? where you have "analogin > 120" is this your voltage value??


Code:
int readAnalogButtonArray()  //this function converts the value from the button voltage divider to a useful value
{
**int analogIn = analogRead(0);
**
**if(analogIn > 120)
**{
****if(analogIn > 380)
****{
******if(analogIn > 640)
******{
********if(analogIn > 900)
********{
**********return 4;
********}
********return 3;
******}
******return 2;
****}
****return 1;
**}
**return 0;
}
Attached Thumbnails
Click image for larger version

Name:	ddddddd.JPG
Views:	38
Size:	38.5 KB
ID:	17921  
  Reply With Quote