You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

max_LCD.ino 796B

1234567891011121314151617181920212223242526272829
  1. // Just a copy of the HelloWorld example bundled with the LiquidCrystal library in the Arduino IDE
  2. // HD44780 compatible LCD display via MAX3421E GPOUT support header
  3. // pinout: D[4-7] -> GPOUT[4-7], RS-> GPOUT[2], E ->GPOUT[3]
  4. #include <max_LCD.h>
  5. // Satisfy IDE, which only needs to see the include statment in the ino.
  6. #ifdef dobogusinclude
  7. #include <spi4teensy3.h>
  8. #include <SPI.h>
  9. #endif
  10. USB Usb;
  11. Max_LCD lcd(&Usb);
  12. void setup() {
  13. // Set up the LCD's number of columns and rows:
  14. lcd.begin(16, 2);
  15. // Print a message to the LCD.
  16. lcd.print("Hello, World!");
  17. }
  18. void loop() {
  19. // Set the cursor to column 0, line 1 (note: line 1 is the second row, since counting begins with 0):
  20. lcd.setCursor(0, 1);
  21. // Print the number of seconds since reset:
  22. lcd.print(millis() / 1000);
  23. }