From b16091659cc9a724a8800f77e631643b4ab089ad Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 18 Aug 2021 18:20:25 +1000 Subject: Move USB Host Shield and Arduino core to `lib/` (#13973) --- .../examples/max_LCD/max_LCD.ino | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/usbhost/USB_Host_Shield_2.0/examples/max_LCD/max_LCD.ino (limited to 'lib/usbhost/USB_Host_Shield_2.0/examples/max_LCD') diff --git a/lib/usbhost/USB_Host_Shield_2.0/examples/max_LCD/max_LCD.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/max_LCD/max_LCD.ino new file mode 100644 index 0000000000..6603ab90db --- /dev/null +++ b/lib/usbhost/USB_Host_Shield_2.0/examples/max_LCD/max_LCD.ino @@ -0,0 +1,29 @@ +// Just a copy of the HelloWorld example bundled with the LiquidCrystal library in the Arduino IDE + +// HD44780 compatible LCD display via MAX3421E GPOUT support header +// pinout: D[4-7] -> GPOUT[4-7], RS-> GPOUT[2], E ->GPOUT[3] + +#include + +// Satisfy IDE, which only needs to see the include statment in the ino. +#ifdef dobogusinclude +#include +#include +#endif + +USB Usb; +Max_LCD lcd(&Usb); + +void setup() { + // Set up the LCD's number of columns and rows: + lcd.begin(16, 2); + // Print a message to the LCD. + lcd.print("Hello, World!"); +} + +void loop() { + // Set the cursor to column 0, line 1 (note: line 1 is the second row, since counting begins with 0): + lcd.setCursor(0, 1); + // Print the number of seconds since reset: + lcd.print(millis() / 1000); +} -- cgit v1.2.3