SHARE
TWEET

NHD-0216PZ LCD Display to Arduino

strel0k Jul 15th, 2012 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*NHD-0216PZ LCD Display to Arduino
  2. Components: LCD Display, 10K potentiometer
  3. For more info visit: http://bit.ly/Sx9YUW
  4. Sourced from: http://bit.ly/LrfesM
  5. Dimitri Sudomoin - Jul.15.2012
  6. */
  7.  
  8. #include <LiquidCrystal.h>
  9.  
  10. // define interface pins
  11. // LiquidCrystal lcd(RS, EN, DB4, DB5, DB6, DB7);
  12. LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
  13.  
  14.  
  15. void setup()
  16. {
  17.   // set LCD's number of columns and rows
  18.   lcd.begin(16, 2);
  19.   // print a message to the LCD
  20.   lcd.print("hello, world!");
  21. }
  22.  
  23.  
  24. void loop()
  25. {
  26.   // set the cursor to column 0, line 1
  27.   // note: line 1 is the second row, since counting begins with 0
  28.   lcd.setCursor(0, 1);
  29.   // print the number of seconds since reset
  30.   lcd.print(millis()/1000);
  31. }
RAW Paste Data
Top