Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant get it to work #1

Open
tarbear123 opened this issue Aug 8, 2018 · 0 comments
Open

cant get it to work #1

tarbear123 opened this issue Aug 8, 2018 · 0 comments

Comments

@tarbear123
Copy link
Owner

the code is:
#include
lcd(8, 9, 4, 5, 6, 7);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Analog 0: ");
lcd.print(currx);
lcd.setCursor(0,1);
lcd.print(btnStr);
}

void loop() {

x = analogRead(A0); // the buttons are read from the analog0 pin

// Check if x has changed
if ((x != 1023) && (x != currx)){

//update screen and change currx
lcd.setCursor(10,0);
lcd.print("     ");
lcd.setCursor(10,0);
lcd.print(x);
currx = x;

if (currx > 740 && currx < 745){

   btnStr="Select";

} else if (currx > 500 && currx < 510){

  btnStr="Left";
  
} else if (currx < 10){

  btnStr="Right";
  
} else if (currx > 140 && currx < 150){

  btnStr="Up";
  
} else if (currx > 320 && currx < 365){

  btnStr="Down";
  
}

  //update button pressed
  lcd.setCursor(0,1);
  lcd.print("        ");
  lcd.setCursor(0,1);
  lcd.print(btnStr);

}

delay(10);

}

and when i click uplload, i get Arduino: 1.8.5 (Windows Store 1.8.10.0) (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\taran\Documents\Arduino\libraries\keypad_values\keypad_values.ino\keypad_values.ino.ino:1:26: fatal error: LiquidCrystal: No such file or directory

#include

                      ^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.
Invalid library found in C:\Users\taran\Documents\Arduino\libraries\keypad_values: C:\Users\taran\Documents\Arduino\libraries\keypad_values
Invalid library found in C:\Users\taran\Documents\Arduino\libraries\Yahzee: C:\Users\taran\Documents\Arduino\libraries\Yahzee
Invalid library found in C:\Users\taran\Documents\Arduino\libraries\keypad_values: C:\Users\taran\Documents\Arduino\libraries\keypad_values
Invalid library found in C:\Users\taran\Documents\Arduino\libraries\Yahzee: C:\Users\taran\Documents\Arduino\libraries\Yahzee
Invalid library found in C:\Users\taran\Documents\Arduino\libraries\keypad_values: C:\Users\taran\Documents\Arduino\libraries\keypad_values
Invalid library found in C:\Users\taran\Documents\Arduino\libraries\Yahzee: C:\Users\taran\Documents\Arduino\libraries\Yahzee

plz help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant