From 2bf30e88ad15c12a829ac2a880f9505b133734a4 Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 16 Mar 2018 12:03:59 +0000 Subject: first working sketch: looping bar --- thermostat.ino | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 thermostat.ino (limited to 'thermostat.ino') 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 +#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 -- cgit v1.2.3