aboutsummaryrefslogtreecommitdiff
path: root/code/004-display.js
diff options
context:
space:
mode:
Diffstat (limited to 'code/004-display.js')
-rw-r--r--code/004-display.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/code/004-display.js b/code/004-display.js
index e7b4cd1..4815e14 100644
--- a/code/004-display.js
+++ b/code/004-display.js
@@ -1,11 +1,7 @@
-var dht = require("DHT22").connect(C11);
+function start() {
+ g.drawString("Hello World!",2,2);
+ g.flip();
+}
I2C1.setup({scl:B6,sda:B7});
var g = require("SH1106").connect(I2C1, start);
-
-dht.read(function (data) {
- console.log("Read DHT22");
- g.drawString("Temp: "+data.temp.toString(),2,2);
- g.drawString(" RH: "+data.rh.toString(),2,10);
- g.flip();
-}); \ No newline at end of file