From 02e2780d233c2d73fcbd32a2a970d5a6f3696224 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 26 Apr 2018 19:46:03 +0200 Subject: wip --- assignments/Makefile | 8 +++++++- assignments/README.md | 2 ++ assignments/README.pdf | Bin 113254 -> 128533 bytes assignments/blink-a-led/blink-a-led.md | 4 ++-- assignments/blink-a-led/blink-a-led.pdf | Bin 722602 -> 722602 bytes assignments/blink-a-led/schematic/assignment-1.fzz | Bin 21480 -> 0 bytes .../blink-a-led/schematic/assignment-1_bb.pdf | Bin 354599 -> 0 bytes .../blink-a-led/schematic/assignment-1_schem.pdf | Bin 263607 -> 0 bytes assignments/blink-a-led/schematic/blink-a-led.fzz | Bin 0 -> 21480 bytes .../blink-a-led/schematic/blink-a-led_bb.pdf | Bin 0 -> 354599 bytes .../blink-a-led/schematic/blink-a-led_schem.pdf | Bin 0 -> 263607 bytes assignments/mqtt/mqtt.pdf | Bin 105234 -> 105234 bytes assignments/read-temperature/read-temperature.md | 8 ++++++++ assignments/read-temperature/read-temperature.pdf | Bin 0 -> 790129 bytes .../schematic/read-temperature.fzz | Bin 0 -> 23036 bytes .../schematic/read-temperature_bb.pdf | Bin 0 -> 392490 bytes .../schematic/read-temperature_schem.pdf | Bin 0 -> 354997 bytes .../solution/read-temperature/read-temperature.ino | 14 ++++++++++++++ 18 files changed, 33 insertions(+), 3 deletions(-) delete mode 100644 assignments/blink-a-led/schematic/assignment-1.fzz delete mode 100644 assignments/blink-a-led/schematic/assignment-1_bb.pdf delete mode 100644 assignments/blink-a-led/schematic/assignment-1_schem.pdf create mode 100644 assignments/blink-a-led/schematic/blink-a-led.fzz create mode 100644 assignments/blink-a-led/schematic/blink-a-led_bb.pdf create mode 100644 assignments/blink-a-led/schematic/blink-a-led_schem.pdf create mode 100644 assignments/read-temperature/read-temperature.md create mode 100644 assignments/read-temperature/read-temperature.pdf create mode 100644 assignments/read-temperature/schematic/read-temperature.fzz create mode 100644 assignments/read-temperature/schematic/read-temperature_bb.pdf create mode 100644 assignments/read-temperature/schematic/read-temperature_schem.pdf create mode 100644 assignments/read-temperature/solution/read-temperature/read-temperature.ino (limited to 'assignments') diff --git a/assignments/Makefile b/assignments/Makefile index 864864e..2f97a07 100644 --- a/assignments/Makefile +++ b/assignments/Makefile @@ -1,4 +1,7 @@ -AS=blink-a-led mqtt +AS = +AS += blink-a-led +AS += read-temperature +AS += mqtt PDFS=$(foreach A,$(AS),$(A)/$(A).pdf) @@ -10,6 +13,9 @@ $(1)/$(1).pdf: $(1)/$(1).md endef $(eval $(foreach A,$(AS),$(call $(A_PATTERN),$(A)))) +clean: + @rm $(wildcard $(PDFS)) + %.pdf: %.md @echo pandoc $< @cd $(dir $<); pandoc $(notdir $<) -o $(notdir $@) diff --git a/assignments/README.md b/assignments/README.md index 363ce15..a6f4dc3 100644 --- a/assignments/README.md +++ b/assignments/README.md @@ -23,6 +23,8 @@ which should include "NodeMCU 1.0 (ESP-12E Module)". * Time * TimeAlarms * WifiManager +* *DHT sensor library* by Adafruit +* *Adafruit sensor library* by Adafruit ## Install Python 3 diff --git a/assignments/README.pdf b/assignments/README.pdf index 51f6f0b..df80c8d 100644 Binary files a/assignments/README.pdf and b/assignments/README.pdf differ diff --git a/assignments/blink-a-led/blink-a-led.md b/assignments/blink-a-led/blink-a-led.md index e7fb5d8..a08bc4e 100644 --- a/assignments/blink-a-led/blink-a-led.md +++ b/assignments/blink-a-led/blink-a-led.md @@ -15,9 +15,9 @@ Create a new sketch with *File* -> *New* and compile it with *ctrl-R*. Wire up this schematic on the bread board: -![](schematic/assignment-1_schem.pdf) +![](schematic/blink-a-led_schem.pdf) -![](schematic/assignment-1_bb.pdf) +![](schematic/blink-a-led_bb.pdf) The colors on the wires used does not matter. The resistors orientation is not important, but the LED's orientation is important. diff --git a/assignments/blink-a-led/blink-a-led.pdf b/assignments/blink-a-led/blink-a-led.pdf index 6456260..785547f 100644 Binary files a/assignments/blink-a-led/blink-a-led.pdf and b/assignments/blink-a-led/blink-a-led.pdf differ diff --git a/assignments/blink-a-led/schematic/assignment-1.fzz b/assignments/blink-a-led/schematic/assignment-1.fzz deleted file mode 100644 index da3ad5b..0000000 Binary files a/assignments/blink-a-led/schematic/assignment-1.fzz and /dev/null differ diff --git a/assignments/blink-a-led/schematic/assignment-1_bb.pdf b/assignments/blink-a-led/schematic/assignment-1_bb.pdf deleted file mode 100644 index 0995ece..0000000 Binary files a/assignments/blink-a-led/schematic/assignment-1_bb.pdf and /dev/null differ diff --git a/assignments/blink-a-led/schematic/assignment-1_schem.pdf b/assignments/blink-a-led/schematic/assignment-1_schem.pdf deleted file mode 100644 index a5241b2..0000000 Binary files a/assignments/blink-a-led/schematic/assignment-1_schem.pdf and /dev/null differ diff --git a/assignments/blink-a-led/schematic/blink-a-led.fzz b/assignments/blink-a-led/schematic/blink-a-led.fzz new file mode 100644 index 0000000..da3ad5b Binary files /dev/null and b/assignments/blink-a-led/schematic/blink-a-led.fzz differ diff --git a/assignments/blink-a-led/schematic/blink-a-led_bb.pdf b/assignments/blink-a-led/schematic/blink-a-led_bb.pdf new file mode 100644 index 0000000..0995ece Binary files /dev/null and b/assignments/blink-a-led/schematic/blink-a-led_bb.pdf differ diff --git a/assignments/blink-a-led/schematic/blink-a-led_schem.pdf b/assignments/blink-a-led/schematic/blink-a-led_schem.pdf new file mode 100644 index 0000000..a5241b2 Binary files /dev/null and b/assignments/blink-a-led/schematic/blink-a-led_schem.pdf differ diff --git a/assignments/mqtt/mqtt.pdf b/assignments/mqtt/mqtt.pdf index aa797bf..4c578f9 100644 Binary files a/assignments/mqtt/mqtt.pdf and b/assignments/mqtt/mqtt.pdf differ diff --git a/assignments/read-temperature/read-temperature.md b/assignments/read-temperature/read-temperature.md new file mode 100644 index 0000000..2528b4a --- /dev/null +++ b/assignments/read-temperature/read-temperature.md @@ -0,0 +1,8 @@ + +## Step 1 + +Wire up this schematic on the bread board: + +![](schematic/read-temperature_schem.pdf) + +![](schematic/read-temperature_bb.pdf) diff --git a/assignments/read-temperature/read-temperature.pdf b/assignments/read-temperature/read-temperature.pdf new file mode 100644 index 0000000..5a13441 Binary files /dev/null and b/assignments/read-temperature/read-temperature.pdf differ diff --git a/assignments/read-temperature/schematic/read-temperature.fzz b/assignments/read-temperature/schematic/read-temperature.fzz new file mode 100644 index 0000000..52a9fa0 Binary files /dev/null and b/assignments/read-temperature/schematic/read-temperature.fzz differ diff --git a/assignments/read-temperature/schematic/read-temperature_bb.pdf b/assignments/read-temperature/schematic/read-temperature_bb.pdf new file mode 100644 index 0000000..79cc8eb Binary files /dev/null and b/assignments/read-temperature/schematic/read-temperature_bb.pdf differ diff --git a/assignments/read-temperature/schematic/read-temperature_schem.pdf b/assignments/read-temperature/schematic/read-temperature_schem.pdf new file mode 100644 index 0000000..d01ab4b Binary files /dev/null and b/assignments/read-temperature/schematic/read-temperature_schem.pdf differ diff --git a/assignments/read-temperature/solution/read-temperature/read-temperature.ino b/assignments/read-temperature/solution/read-temperature/read-temperature.ino new file mode 100644 index 0000000..71e860e --- /dev/null +++ b/assignments/read-temperature/solution/read-temperature/read-temperature.ino @@ -0,0 +1,14 @@ +#include +#include + +const auto DHTPIN = D1; +const auto DHTTYPE = DHT22; + +DHT_Unified dht(DHTPIN, DHTTYPE); + +void setup() { +} + +void loop() { +} + -- cgit v1.2.3