Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LiquidCrystal.h>
- //initialize library with numbers of interface pins
- LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //pins for RS, E, D4, D5, DG, D7 respectively
- const int tiltpin=7;
- int newTilt;
- void setup()
- {
- //set up the number of columns and rows on the LCD
- lcd.begin(16,2);
- lcd.setCursor(5,0);
- lcd.print ("veda");
- //set the cursor to column 0, line 1
- //line 1 is the second row, since counting begins with 0
- lcd.setCursor (1,1);
- //print to the second line
- lcd.print ("I am awesome");
- Serial.begin (9600);
- }
- void loop()
- {
- newTilt = digitalRead (tiltpin);
- Serial.println (newTilt);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement