summaryrefslogtreecommitdiff
path: root/thermostat.ino
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2018-03-16 12:03:59 +0000
committerdakkar <dakkar@thenautilus.net>2018-03-16 12:03:59 +0000
commit2bf30e88ad15c12a829ac2a880f9505b133734a4 (patch)
tree8945debb6d05302f0ea4bbc61195879d1e0d7f4d /thermostat.ino
downloadthermostat-2bf30e88ad15c12a829ac2a880f9505b133734a4.tar.gz
thermostat-2bf30e88ad15c12a829ac2a880f9505b133734a4.tar.bz2
thermostat-2bf30e88ad15c12a829ac2a880f9505b133734a4.zip
first working sketch: looping bar
Diffstat (limited to 'thermostat.ino')
-rw-r--r--thermostat.ino20
1 files changed, 20 insertions, 0 deletions
diff --git a/thermostat.ino b/thermostat.ino
new file mode 100644
index 0000000..06b1769
--- /dev/null
+++ b/thermostat.ino
@@ -0,0 +1,20 @@
+#include <Wire.h>
+#include "SSD1306.h"
+
+SSD1306 display(0x3c, 5, 4);
+
+void setup() {
+ display.init();
+ display.connect();
+ display.displayOn();
+ display.setColor(WHITE);
+ display.setTextAlignment(TEXT_ALIGN_CENTER);
+}
+
+int pos=0;
+void loop() {
+ display.clear();
+ display.drawProgressBar(5,5,120,20,pos);
+ display.display();
+ ++pos;pos %= 100;
+} \ No newline at end of file