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