Created
January 5, 2016 10:09
-
-
Save gyaresu/ff599f46b7df78ea7fdb to your computer and use it in GitHub Desktop.
Teensy 3.1 test code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address | |
void setup() { | |
// set up the LCD's number of rows and columns: | |
lcd.begin(20, 4); | |
// 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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Give the following a shot:
include <LCD.h>
In any case, the library doesn't support the full teensy range of devices. Which device are you trying?