diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-05-08 10:08:32 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-05-08 10:08:32 +0200 |
commit | 5ec40ac294aa8f092b3f70dca1cb6d103699a995 (patch) | |
tree | 36c88ba66518ba2217b8ddb1cdba80c05839a2bc /assignments | |
parent | 50a4f485667699d091ef8bd3cac3a73290bf0cba (diff) | |
download | iot-workshop-ndc-2018-5ec40ac294aa8f092b3f70dca1cb6d103699a995.tar.gz iot-workshop-ndc-2018-5ec40ac294aa8f092b3f70dca1cb6d103699a995.tar.bz2 iot-workshop-ndc-2018-5ec40ac294aa8f092b3f70dca1cb6d103699a995.tar.xz iot-workshop-ndc-2018-5ec40ac294aa8f092b3f70dca1cb6d103699a995.zip |
wip
Diffstat (limited to 'assignments')
-rw-r--r-- | assignments/Makefile | 3 | ||||
-rw-r--r-- | assignments/README.md | 2 | ||||
-rw-r--r-- | assignments/README.pdf | bin | 128533 -> 129305 bytes | |||
-rw-r--r-- | assignments/read-a-button/read-a-button.md | 12 | ||||
-rw-r--r-- | assignments/read-a-button/read-a-button.pdf | bin | 0 -> 321997 bytes | |||
-rw-r--r-- | assignments/read-a-button/schematic/read-a-button.fzz | bin | 0 -> 22670 bytes | |||
-rw-r--r-- | assignments/read-a-button/schematic/read-a-button_bb.pdf | bin | 0 -> 446283 bytes | |||
-rw-r--r-- | assignments/read-a-button/schematic/read-a-button_schem.pdf | bin | 0 -> 273880 bytes | |||
-rw-r--r-- | assignments/read-temperature/read-temperature.md | 1 | ||||
-rw-r--r-- | assignments/read-temperature/read-temperature.pdf | bin | 791810 -> 794796 bytes | |||
-rw-r--r-- | assignments/read-temperature/solution/read-temperature/read-temperature.ino | 10 |
11 files changed, 26 insertions, 2 deletions
diff --git a/assignments/Makefile b/assignments/Makefile index ad3e8be..e1ec335 100644 --- a/assignments/Makefile +++ b/assignments/Makefile @@ -1,9 +1,10 @@ AS = AS += blink-a-led -AS += read-temperature AS += mqtt AS += mqtt2 AS += mqtt3 +AS += read-a-button +AS += read-temperature PDFS=$(foreach A,$(AS),$(A)/$(A).pdf) diff --git a/assignments/README.md b/assignments/README.md index a6f4dc3..a18e1cf 100644 --- a/assignments/README.md +++ b/assignments/README.md @@ -24,7 +24,7 @@ which should include "NodeMCU 1.0 (ESP-12E Module)". * TimeAlarms * WifiManager * *DHT sensor library* by Adafruit -* *Adafruit sensor library* by Adafruit +* *Adafruit unified sensor* by Adafruit ## Install Python 3 diff --git a/assignments/README.pdf b/assignments/README.pdf Binary files differindex df80c8d..1a2a2a5 100644 --- a/assignments/README.pdf +++ b/assignments/README.pdf diff --git a/assignments/read-a-button/read-a-button.md b/assignments/read-a-button/read-a-button.md new file mode 100644 index 0000000..2cf7592 --- /dev/null +++ b/assignments/read-a-button/read-a-button.md @@ -0,0 +1,12 @@ +# Read a button + +## Step 1 + +Wire up this schematic on the bread board: + +![](schematic/read-a-button_schem.pdf) + +## Step 2 + +* Change sampling frequency + diff --git a/assignments/read-a-button/read-a-button.pdf b/assignments/read-a-button/read-a-button.pdf Binary files differnew file mode 100644 index 0000000..057d0a1 --- /dev/null +++ b/assignments/read-a-button/read-a-button.pdf diff --git a/assignments/read-a-button/schematic/read-a-button.fzz b/assignments/read-a-button/schematic/read-a-button.fzz Binary files differnew file mode 100644 index 0000000..bb4263a --- /dev/null +++ b/assignments/read-a-button/schematic/read-a-button.fzz diff --git a/assignments/read-a-button/schematic/read-a-button_bb.pdf b/assignments/read-a-button/schematic/read-a-button_bb.pdf Binary files differnew file mode 100644 index 0000000..8473764 --- /dev/null +++ b/assignments/read-a-button/schematic/read-a-button_bb.pdf diff --git a/assignments/read-a-button/schematic/read-a-button_schem.pdf b/assignments/read-a-button/schematic/read-a-button_schem.pdf Binary files differnew file mode 100644 index 0000000..bc957bc --- /dev/null +++ b/assignments/read-a-button/schematic/read-a-button_schem.pdf diff --git a/assignments/read-temperature/read-temperature.md b/assignments/read-temperature/read-temperature.md index 1037ba9..31a32a8 100644 --- a/assignments/read-temperature/read-temperature.md +++ b/assignments/read-temperature/read-temperature.md @@ -1,3 +1,4 @@ +# Read the temperature and humidity sensor DHT22 ## Step 1 diff --git a/assignments/read-temperature/read-temperature.pdf b/assignments/read-temperature/read-temperature.pdf Binary files differindex 51e3c1b..f1ec641 100644 --- a/assignments/read-temperature/read-temperature.pdf +++ b/assignments/read-temperature/read-temperature.pdf diff --git a/assignments/read-temperature/solution/read-temperature/read-temperature.ino b/assignments/read-temperature/solution/read-temperature/read-temperature.ino index 71e860e..b261dc5 100644 --- a/assignments/read-temperature/solution/read-temperature/read-temperature.ino +++ b/assignments/read-temperature/solution/read-temperature/read-temperature.ino @@ -7,8 +7,18 @@ const auto DHTTYPE = DHT22; DHT_Unified dht(DHTPIN, DHTTYPE); void setup() { + Serial.begin(115200); + pinMode(D2, INPUT); + pinMode(D0, OUTPUT); } void loop() { + if (digitalRead(D2) == HIGH) { + Serial.println("HIGH"); + } else { + Serial.println("LOW"); + } + digitalWrite(D0, digitalRead(D2)); + delay(100); } |