aboutsummaryrefslogtreecommitdiff
path: root/code/004-display.js
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2017-02-24 18:56:53 +0100
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2017-02-24 18:56:53 +0100
commit06b1851216e42923b0df70bb498df8cf106965cc (patch)
tree43e42c037ad87a7137cc3a4715c7bc6edcef7aef /code/004-display.js
parentfa9c2ee2b01b04b23c249d1f953e1cfef1c8edea (diff)
Completed code project
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