aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-01-31 18:27:49 +0100
committerKarel Kočí <cynerd@email.cz>2017-01-31 18:49:57 +0100
commit5062173627f9d1741061312ceeadd44d4bc0fc24 (patch)
treece63caf1c2a8f99ecd6326f8a47fcc22cf04f0aa /src
downloadturris-lcd-example-5062173627f9d1741061312ceeadd44d4bc0fc24.tar.gz
turris-lcd-example-5062173627f9d1741061312ceeadd44d4bc0fc24.tar.bz2
turris-lcd-example-5062173627f9d1741061312ceeadd44d4bc0fc24.zip
Initial commit
Diffstat (limited to 'src')
-rw-r--r--src/turris-lcd.cpp17
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;
+}