diff options
author | Karel Kočí <cynerd@email.cz> | 2017-01-31 18:27:49 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-01-31 18:49:57 +0100 |
commit | 5062173627f9d1741061312ceeadd44d4bc0fc24 (patch) | |
tree | ce63caf1c2a8f99ecd6326f8a47fcc22cf04f0aa /src/turris-lcd.cpp | |
download | turris-lcd-example-5062173627f9d1741061312ceeadd44d4bc0fc24.tar.gz turris-lcd-example-5062173627f9d1741061312ceeadd44d4bc0fc24.tar.bz2 turris-lcd-example-5062173627f9d1741061312ceeadd44d4bc0fc24.zip |
Initial commit
Diffstat (limited to 'src/turris-lcd.cpp')
-rw-r--r-- | src/turris-lcd.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/turris-lcd.cpp b/src/turris-lcd.cpp new file mode 100644 index 0000000..d9509e0 --- /dev/null +++ b/src/turris-lcd.cpp @@ -0,0 +1,17 @@ +#include <iostream> +#include <LiquidCrystal_I2C.h> + +using namespace std; + +int main(int argc, char *argv[]) { + // Initialize LCD + LiquidCrystal_I2C lcd("/dev/i2c-2", 0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); + lcd.begin(20, 4); + + lcd.on(); + lcd.clear(); + + lcd.print("Turris Omnia"); + + return 0; +} |