aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md11
-rw-r--r--assignments/Makefile3
-rw-r--r--assignments/README.md2
-rw-r--r--assignments/README.pdfbin128533 -> 129305 bytes
-rw-r--r--assignments/read-a-button/read-a-button.md12
-rw-r--r--assignments/read-a-button/read-a-button.pdfbin0 -> 321997 bytes
-rw-r--r--assignments/read-a-button/schematic/read-a-button.fzzbin0 -> 22670 bytes
-rw-r--r--assignments/read-a-button/schematic/read-a-button_bb.pdfbin0 -> 446283 bytes
-rw-r--r--assignments/read-a-button/schematic/read-a-button_schem.pdfbin0 -> 273880 bytes
-rw-r--r--assignments/read-temperature/read-temperature.md1
-rw-r--r--assignments/read-temperature/read-temperature.pdfbin791810 -> 794796 bytes
-rw-r--r--assignments/read-temperature/solution/read-temperature/read-temperature.ino10
12 files changed, 37 insertions, 2 deletions
diff --git a/README.md b/README.md
index 9cbfc40..7ab0616 100644
--- a/README.md
+++ b/README.md
@@ -9,3 +9,14 @@
* Fritzing model of NodeMCU: https://github.com/roman-minyaylov/fritzing-parts/tree/master/esp8266-nodemcu-v3
* Arduino ESP8266 documentation: https://media.readthedocs.org/pdf/arduino-esp8266/latest/arduino-esp8266.pdf
* DHT11/DHT22 documentation: https://cdn-learn.adafruit.com/downloads/pdf/dht.pdf
+
+ekstra:
+* scope
+* logikkanalysator
+ - måle hvor lang tid operasjoner tar
+* diskusjoner
+ - signup
+ - reconfiguration
+ - factory reset/clear configuration
+ - når noen selger devicen sin
+
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
index df80c8d..1a2a2a5 100644
--- a/assignments/README.pdf
+++ b/assignments/README.pdf
Binary files differ
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
new file mode 100644
index 0000000..057d0a1
--- /dev/null
+++ b/assignments/read-a-button/read-a-button.pdf
Binary files differ
diff --git a/assignments/read-a-button/schematic/read-a-button.fzz b/assignments/read-a-button/schematic/read-a-button.fzz
new file mode 100644
index 0000000..bb4263a
--- /dev/null
+++ b/assignments/read-a-button/schematic/read-a-button.fzz
Binary files differ
diff --git a/assignments/read-a-button/schematic/read-a-button_bb.pdf b/assignments/read-a-button/schematic/read-a-button_bb.pdf
new file mode 100644
index 0000000..8473764
--- /dev/null
+++ b/assignments/read-a-button/schematic/read-a-button_bb.pdf
Binary files differ
diff --git a/assignments/read-a-button/schematic/read-a-button_schem.pdf b/assignments/read-a-button/schematic/read-a-button_schem.pdf
new file mode 100644
index 0000000..bc957bc
--- /dev/null
+++ b/assignments/read-a-button/schematic/read-a-button_schem.pdf
Binary files differ
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
index 51e3c1b..f1ec641 100644
--- a/assignments/read-temperature/read-temperature.pdf
+++ b/assignments/read-temperature/read-temperature.pdf
Binary files differ
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);
}