aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-04-25 09:03:31 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-04-25 09:03:31 +0200
commit42ec7df723ece5c2c4400d8db24e3a2ac6b826d0 (patch)
treeb60357f2fd4cae75fa12816fe22284d454ca39b9
parentfc8c037b80dea764393b79cba85a83004bd0aef6 (diff)
downloadiot-workshop-42ec7df723ece5c2c4400d8db24e3a2ac6b826d0.tar.gz
iot-workshop-42ec7df723ece5c2c4400d8db24e3a2ac6b826d0.tar.bz2
iot-workshop-42ec7df723ece5c2c4400d8db24e3a2ac6b826d0.tar.xz
iot-workshop-42ec7df723ece5c2c4400d8db24e3a2ac6b826d0.zip
wip
-rw-r--r--arduino/01-blink-a-led/Makefile4
-rw-r--r--arduino/01-blink-a-led/blink-a-led.md39
-rw-r--r--arduino/01-blink-a-led/blink-a-led.pdfbin0 -> 703496 bytes
-rw-r--r--arduino/01-blink-a-led/schematic/assignment-1.fzzbin0 -> 21480 bytes
-rw-r--r--arduino/01-blink-a-led/schematic/assignment-1_bb.pdfbin0 -> 354599 bytes
-rw-r--r--arduino/01-blink-a-led/schematic/assignment-1_schem.pdfbin0 -> 263607 bytes
-rw-r--r--arduino/01-blink-a-led/solution/assignment-1/assignment-1.ino20
-rw-r--r--arduino/Makefile5
-rw-r--r--arduino/Makefile.assignment8
-rw-r--r--arduino/client1/client1.ino71
-rw-r--r--arduino/client1/config.h5
-rwxr-xr-xhost/udp-client.py31
-rwxr-xr-xhost/udp-server.py18
-rw-r--r--slides/README.md2
-rw-r--r--slides/what-is-iot-reveal.html151
-rw-r--r--slides/what-is-iot-slides.pdfbin221761 -> 571648 bytes
-rw-r--r--slides/what-is-iot-slides.tex113
-rw-r--r--slides/what-is-iot-text.pdfbin87314 -> 689296 bytes
-rw-r--r--slides/what-is-iot.md67
19 files changed, 480 insertions, 54 deletions
diff --git a/arduino/01-blink-a-led/Makefile b/arduino/01-blink-a-led/Makefile
new file mode 100644
index 0000000..b015ec1
--- /dev/null
+++ b/arduino/01-blink-a-led/Makefile
@@ -0,0 +1,4 @@
+DIR=01-blink-a-led
+A=blink-a-led
+
+include $(BASEDIR)/Makefile.assignment
diff --git a/arduino/01-blink-a-led/blink-a-led.md b/arduino/01-blink-a-led/blink-a-led.md
new file mode 100644
index 0000000..f4b3fa1
--- /dev/null
+++ b/arduino/01-blink-a-led/blink-a-led.md
@@ -0,0 +1,39 @@
+# Assignment: Blink a led
+
+
+## Goal
+
+Check that your local environment is working properly.
+
+## Step 1
+
+Create this schematic:
+
+![](schematic/assignment-1_schem.pdf)
+
+![](schematic/assignment-1_bb.pdf)
+
+The colors on the wires used does not matter. The resistors
+orientation is not important, but the LED's orientation is important.
+
+## Step 2
+
+Implement `setup()` and `loop()`. In `setup()` configure the LED pin and blink the LED in `loop()`.
+
+Use these functions:
+
+~~~ .c++
+
+Serial.begin(115200);
+Serial.println(string);
+
+pinMode(pin, mode);
+digitalWrite(pin, state); // HIGH or LOW
+delay();
+
+~~~
+
+## Tips
+
+* It is useful to print a startup message just to see when the
+ application has started.
diff --git a/arduino/01-blink-a-led/blink-a-led.pdf b/arduino/01-blink-a-led/blink-a-led.pdf
new file mode 100644
index 0000000..de719fd
--- /dev/null
+++ b/arduino/01-blink-a-led/blink-a-led.pdf
Binary files differ
diff --git a/arduino/01-blink-a-led/schematic/assignment-1.fzz b/arduino/01-blink-a-led/schematic/assignment-1.fzz
new file mode 100644
index 0000000..da3ad5b
--- /dev/null
+++ b/arduino/01-blink-a-led/schematic/assignment-1.fzz
Binary files differ
diff --git a/arduino/01-blink-a-led/schematic/assignment-1_bb.pdf b/arduino/01-blink-a-led/schematic/assignment-1_bb.pdf
new file mode 100644
index 0000000..0995ece
--- /dev/null
+++ b/arduino/01-blink-a-led/schematic/assignment-1_bb.pdf
Binary files differ
diff --git a/arduino/01-blink-a-led/schematic/assignment-1_schem.pdf b/arduino/01-blink-a-led/schematic/assignment-1_schem.pdf
new file mode 100644
index 0000000..a5241b2
--- /dev/null
+++ b/arduino/01-blink-a-led/schematic/assignment-1_schem.pdf
Binary files differ
diff --git a/arduino/01-blink-a-led/solution/assignment-1/assignment-1.ino b/arduino/01-blink-a-led/solution/assignment-1/assignment-1.ino
new file mode 100644
index 0000000..5b72892
--- /dev/null
+++ b/arduino/01-blink-a-led/solution/assignment-1/assignment-1.ino
@@ -0,0 +1,20 @@
+const int LED_PIN = D0;
+
+void setup() {
+ Serial.begin(115200);
+ Serial.println();
+ Serial.println();
+ Serial.println("Hello world!");
+ pinMode(LED_PIN, OUTPUT);
+}
+
+void loop() {
+ digitalWrite(LED_PIN, HIGH);
+ Serial.println("HIGH");
+ delay(1000);
+
+ digitalWrite(LED_PIN, LOW);
+ Serial.println("LOW");
+ delay(1000);
+}
+
diff --git a/arduino/Makefile b/arduino/Makefile
new file mode 100644
index 0000000..c7ae828
--- /dev/null
+++ b/arduino/Makefile
@@ -0,0 +1,5 @@
+AS=01-blink-a-led
+
+BASEDIR=$(CURDIR)
+
+include $(patsubst %,%/Makefile,$(AS))
diff --git a/arduino/Makefile.assignment b/arduino/Makefile.assignment
new file mode 100644
index 0000000..d05662f
--- /dev/null
+++ b/arduino/Makefile.assignment
@@ -0,0 +1,8 @@
+all: $(DIR)/$(A).pdf
+
+$(DIR)/$(A).pdf: $(DIR)/$(A).md
+ @echo pandoc $(A).md
+ @cd $(DIR); pandoc $(patsubst $(DIR)/%,%,$<) -o $(patsubst $(DIR)/%,%,$@)
+
+clean:
+ @rm -f $(DIR)/$(A).pdf
diff --git a/arduino/client1/client1.ino b/arduino/client1/client1.ino
new file mode 100644
index 0000000..39eabfe
--- /dev/null
+++ b/arduino/client1/client1.ino
@@ -0,0 +1,71 @@
+#include <ESP8266WiFi.h>
+#include <WiFiUdp.h>
+
+#include "config.h"
+
+WiFiUDP Udp;
+unsigned int localUdpPort = 5006;
+IPAddress host_ip(192, 168, 10, 151);
+unsigned int host_port = 5005;
+
+const int out_buf_len_start = 100;
+const int out_buf_len_increment = 100;
+const int out_buf_len_max = 2200;
+
+char buf[out_buf_len_max];
+int out_buf_len;
+
+static const char alphabet[] = "abcdefghijklmnopqrstuvxyz";
+
+unsigned long time_start, time_end;
+
+void setup() {
+ Serial.begin(115200);
+
+ Serial.printf("Connecting to %s ", wifi_ssid);
+ WiFi.begin(wifi_ssid, wifi_password);
+ while (WiFi.status() != WL_CONNECTED) {
+ delay(500);
+ Serial.print(".");
+ }
+ Serial.println(" connected");
+
+ Udp.begin(localUdpPort);
+ time_start = millis();
+ out_buf_len = out_buf_len_start;
+}
+
+void loop() {
+
+ if (millis() > (time_start + 1000)) {
+ for (int i = 0; i < out_buf_len; i++) {
+ buf[i] = alphabet[i % sizeof(alphabet) - 1];
+ }
+ out_buf_len += out_buf_len_increment;
+ if (out_buf_len > out_buf_len_max) {
+ out_buf_len = out_buf_len_start;
+ }
+ Serial.printf("Sending %d bytes to %s:%d\n", out_buf_len, host_ip.toString().c_str(), host_port);
+ Udp.beginPacket(host_ip, host_port);
+ Udp.write(buf, out_buf_len);
+ time_start = millis();
+ auto ok = Udp.endPacket();
+
+ if (!ok) {
+ Serial.printf("Could not send packet with size %d\n", out_buf_len);
+ }
+ }
+
+ int len = Udp.parsePacket();
+ if (len) {
+ time_end = millis();
+ Serial.printf("RX %s:%d: size=%d\n", Udp.remoteIP().toString().c_str(), Udp.remotePort(), len);
+ int len = Udp.read(buf, sizeof(buf));
+ Serial.printf("len=%d\n");
+ if (len > 0) {
+ buf[len] = 0;
+ }
+ Serial.printf("RTT: %d ms. Payload:%s\n", int(time_end - time_start), buf);
+ }
+}
+
diff --git a/arduino/client1/config.h b/arduino/client1/config.h
new file mode 100644
index 0000000..ea9affe
--- /dev/null
+++ b/arduino/client1/config.h
@@ -0,0 +1,5 @@
+#pragma once
+
+const char wifi_ssid[] = "***REMOVED***";
+const char wifi_password[] = "***REMOVED***";
+
diff --git a/host/udp-client.py b/host/udp-client.py
new file mode 100755
index 0000000..5e2b132
--- /dev/null
+++ b/host/udp-client.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python3
+
+import socket, asyncoro
+
+ip = "127.0.0.1"
+ip = "192.168.10.151"
+port = 5005
+msg = "Hello, World!"
+
+print("UDP target IP: {}".format(ip))
+print("UDP target port: {}".format(port))
+print("message: {}".format(msg))
+
+sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+
+start = None
+
+def client(coro=None):
+ buffer_size = 64 * 1024
+ print("Waiting for packet")
+ msg, (ip, port) = yield sock.recvfrom(buffer_size)
+ end = time.process_time()
+ print("Received '{}' from {}:{}".format(msg, ip, port))
+ print("RTT: {:.3f} ms".format((end - start) * 1000))
+
+asyncoro.Coro(client)
+import time
+time.sleep(0.1)
+print("Sending")
+start = time.process_time()
+sock.sendto(msg.encode("utf-8"), (ip, port))
diff --git a/host/udp-server.py b/host/udp-server.py
new file mode 100755
index 0000000..79bbe73
--- /dev/null
+++ b/host/udp-server.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+
+import socket
+
+UDP_IP = "0.0.0.0"
+UDP_PORT = 5005
+
+sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+sock.bind((UDP_IP, UDP_PORT))
+
+buffser_size = 64 * 1024
+
+while True:
+ data, (remote_ip, remote_port) = sock.recvfrom(buffser_size)
+ s = data.decode("utf-8", "ignore")
+ print("=> {}:{}: size={}, packet={}".format(remote_ip, remote_port, len(data), s))
+ sock.sendto(data, (remote_ip, remote_port))
+
diff --git a/slides/README.md b/slides/README.md
index 912b907..9d1d71e 100644
--- a/slides/README.md
+++ b/slides/README.md
@@ -3,3 +3,5 @@
* Some TikZ diagrams where taken from:
https://github.com/tabascoeye/TikZ-diagrams/tree/master/networking
(Beerwarae licensed)
+* NodeMCU picture from: https://i2.wp.com/electronilab.co/wp-content/uploads/2016/02/NodeMCU-%E2%80%93-Board-de-desarrollo-con-m%C3%B3dulo-ESP8266-WiFi-y-Lua-4.jpg
+* Fritzing model of NodeMCU: https://github.com/roman-minyaylov/fritzing-parts/tree/master/esp8266-nodemcu-v3
diff --git a/slides/what-is-iot-reveal.html b/slides/what-is-iot-reveal.html
index 1ad9d7b..a2f7d9e 100644
--- a/slides/what-is-iot-reveal.html
+++ b/slides/what-is-iot-reveal.html
@@ -40,7 +40,16 @@
<p class="author">Trygve Laugstøl &lt;trygvis@trygvis.io&gt;</p>
</section>
-<section><section id="what-is-iot" class="title-slide slide level1"><h1>What is IoT</h1></section><section id="what-is-iot-1" class="slide level2">
+<section><section id="what-is-iot" class="title-slide slide level1"><h1>What is IoT</h1></section><section id="wat-png" class="slide level2">
+<h2>wat png</h2>
+<p><img data-src="/home/trygvis/Dokumenter/Fritzing/bins/Untitled%20Sketch_bb.png" /></p>
+</section><section id="wat-pdf" class="slide level2">
+<h2>wat pdf</h2>
+<p><embed data-src="/home/trygvis/Dokumenter/Fritzing/bins/Untitled%20Sketch_bb.pdf" /></p>
+</section><section id="wat-svg" class="slide level2">
+<h2>wat svg</h2>
+<p><img data-src="/home/trygvis/Dokumenter/Fritzing/bins/Untitled%20Sketch_bb.svg" /></p>
+</section><section id="what-is-iot-1" class="slide level2">
<h2>What is IoT</h2>
<ul>
<li>Not “a computer connected to the internet”
@@ -77,22 +86,26 @@
<li>Network bandwidth and/or latency</li>
<li>Storage</li>
</ul></li>
-<li>Connected
+<li>Has connectivity
<ul>
<li>Bluetooth</li>
<li>Wi-Fi</li>
<li>NB-IoT</li>
-<li>LTE Cat-M <!-- --></li>
+<li>LTE Cat-M</li>
+<li>LoRA</li>
+<li>Proprietary radio</li>
+</ul></li>
+</ul>
+<aside class="notes">
+<ul>
<li>IR</li>
<li>UART</li>
<li>CAN</li>
-</ul></li>
</ul>
-<aside class="notes">
-
+<p>Sparkfun and Adafruit etc sell modules with all of these technologies.</p>
</aside>
-</section><section id="typical-iot-chips---bluetooth-45" class="slide level2">
-<h2>Typical IoT chips - Bluetooth 4/5</h2>
+</section><section id="iot-devices---bluetooth-45-chips" class="slide level2">
+<h2>IoT Devices - Bluetooth 4/5 chips</h2>
<table>
<thead>
<tr class="header">
@@ -114,25 +127,124 @@
<td style="text-align: left;">$1.88</td>
</tr>
<tr class="even">
-<td style="text-align: left;">High perf</td>
-<td style="text-align: left;">ormance,</td>
-<td>entry</td>
-<td style="text-align: left;">-level Bl</td>
-<td style="text-align: left;">uetooth</td>
-<td style="text-align: left;">4/ANT/2.4GHz SoC</td>
+<td style="text-align: left;">nRF52832</td>
+<td style="text-align: left;">Cortex-M4</td>
+<td>F</td>
+<td style="text-align: left;">32k</td>
+<td style="text-align: left;">256k</td>
+<td style="text-align: left;">$2.54</td>
+</tr>
+<tr class="odd">
+<td style="text-align: left;"></td>
+<td style="text-align: left;"></td>
+<td></td>
+<td style="text-align: left;">64k</td>
+<td style="text-align: left;">512k</td>
+<td style="text-align: left;">$2.59</td>
+</tr>
+<tr class="even">
+<td style="text-align: left;">nRF52840</td>
+<td style="text-align: left;">Cortex-M4</td>
+<td>F</td>
+<td style="text-align: left;">256k</td>
+<td style="text-align: left;">1024k</td>
+<td style="text-align: left;">$3.85</td>
</tr>
</tbody>
</table>
-<p>nRF52832 Cortex-M4F 32k 256k $2.54 64k 512k $2.59 High performance Bluetooth 4/ANT/2.4GHz SoC</p>
-<p>nRF52840 Cortex-M4F 256k 1024k $3.85 Advanced multi-protocol System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz proprietary</p>
+<ul>
+<li>nRF52810: High performance, entry-level Bluetooth 4/ANT/2.4GHz SoC</li>
+<li>nRF52832: High performance Bluetooth 4/ANT/2.4GHz SoC</li>
+<li>nRF52840: Advanced multi-protocol System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz proprietary</li>
+</ul>
<aside class="notes">
<p>All quantities are 1000 pieces</p>
<p>nRF51: https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?k=nrf51822</p>
<p>nRF52832: these have different packagings, not only difference price</p>
<p>https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?FV=1c0001%2Cffe0036f&amp;quantity=3000&amp;ColumnSort=1000011&amp;page=1&amp;k=nrf52832&amp;pageSize=500&amp;pkeyword=nrf52810</p>
+<p>nRF52810: High performance, entry-level Bluetooth 4/ANT/2.4GHz SoC nRF52832: High performance Bluetooth 4/ANT/2.4GHz SoC nRF52840: Advanced multi-protocol System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz proprietary</p>
+</aside>
+</section><section id="iot-devices---lora" class="slide level2">
+<h2>IoT Devices - LoRA</h2>
+<h3 id="modules">Modules</h3>
+<table>
+<thead>
+<tr class="header">
+<th>Module</th>
+<th>Data Rate</th>
+<th style="text-align: left;">Price</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td>RN2483A-I/RM104</td>
+<td></td>
+<td style="text-align: left;">$12.05 @ 250</td>
+</tr>
+<tr class="even">
+<td>CMWX1ZZABZ-078</td>
+<td>SX1276</td>
+<td style="text-align: left;">$10.74 @ 1000</td>
+</tr>
+<tr class="odd">
+<td>RF-LORA-868-SO</td>
+<td>SX1272</td>
+<td style="text-align: left;">$16.55 @ 1000</td>
+</tr>
+</tbody>
+</table>
+<h3 id="chips">Chips</h3>
+<table>
+<thead>
+<tr class="header">
+<th>Chip</th>
+<th style="text-align: left;">Price</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td>SX1281</td>
+<td style="text-align: left;">$3.23</td>
+</tr>
+<tr class="even">
+<td>SX1272</td>
+<td style="text-align: left;">$4.25</td>
+</tr>
+<tr class="odd">
+<td>SX1276</td>
+<td style="text-align: left;">$4.25</td>
+</tr>
+<tr class="even">
+<td>SX1279</td>
+<td style="text-align: left;">$4.74</td>
+</tr>
+</tbody>
+</table>
+<aside class="notes">
+<p>These modules require an external MCU, so does the chips.</p>
</aside>
-</section><section id="typical-iot-chips---wi-fi" class="slide level2">
-<h2>Typical IoT chips - Wi-Fi</h2>
+</section><section id="iot-devices---nb-iot" class="slide level2">
+<h2>IoT Devices - NB-IoT</h2>
+<table>
+<thead>
+<tr class="header">
+<th>Module</th>
+<th>Price</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td>uBlox SARA-N210</td>
+<td>~$10 @ 100</td>
+</tr>
+<tr class="even">
+<td>Sierra Wireless HL7800_1103933</td>
+<td>$15.72</td>
+</tr>
+</tbody>
+</table>
+</section><section id="iot-devices---wi-fi" class="slide level2">
+<h2>IoT Devices - Wi-Fi</h2>
<table>
<thead>
<tr class="header">
@@ -290,6 +402,9 @@
</section></section>
<section><section id="lecture-esp8266" class="title-slide slide level1"><h1>Lecture: ESP8266</h1></section><section id="nodemcu-hardware" class="slide level2">
<h2>NodeMCU hardware</h2>
+<p><img data-src="images/NodeMCU-–-Board-de-desarrollo-con-módulo-ESP8266-WiFi-y-Lua-4.jpg" /></p>
+</section><section id="nodemcu-hardware-1" class="slide level2">
+<h2>NodeMCU hardware</h2>
</section><section id="esp8266-software-layers" class="slide level2">
<h2>ESP8266 software layers</h2>
diff --git a/slides/what-is-iot-slides.pdf b/slides/what-is-iot-slides.pdf
index 6e89140..9eb29db 100644
--- a/slides/what-is-iot-slides.pdf
+++ b/slides/what-is-iot-slides.pdf
Binary files differ
diff --git a/slides/what-is-iot-slides.tex b/slides/what-is-iot-slides.tex
index f6a35b4..e3646f7 100644
--- a/slides/what-is-iot-slides.tex
+++ b/slides/what-is-iot-slides.tex
@@ -78,7 +78,7 @@ What differentiates a computer from an IoT device?}
Storage
\end{itemize}
\item
- Connected
+ Has connectivity
\begin{itemize}
\tightlist
@@ -89,22 +89,30 @@ What differentiates a computer from an IoT device?}
\item
NB-IoT
\item
- LTE Cat-M
+ LTE Cat-M
\item
- IR
+ LoRA
\item
- UART
- \item
- CAN
+ Proprietary radio
\end{itemize}
\end{itemize}
-\note{}
+\note{\begin{itemize}
+\tightlist
+\item
+ IR
+\item
+ UART
+\item
+ CAN
+\end{itemize}
+
+Sparkfun and Adafruit etc sell modules with all of these technologies.}
\end{frame}
-\begin{frame}{Typical IoT chips - Bluetooth 4/5}
-\protect\hypertarget{typical-iot-chips---bluetooth-45}{}
+\begin{frame}{IoT Devices - Bluetooth 4/5 chips}
+\protect\hypertarget{iot-devices---bluetooth-45-chips}{}
\begin{longtable}[]{@{}llllll@{}}
\toprule
@@ -112,17 +120,22 @@ Chip & CPU & Freq & RAM & Flash & Price\tabularnewline
\midrule
\endhead
nRF52810 & Cortex-M4 & 64 M & Hz 24k & 192k & \$1.88\tabularnewline
-High perf & ormance, & entry & -level Bl & uetooth & 4/ANT/2.4GHz
-SoC\tabularnewline
+nRF52832 & Cortex-M4 & F & 32k & 256k & \$2.54\tabularnewline
+& & & 64k & 512k & \$2.59\tabularnewline
+nRF52840 & Cortex-M4 & F & 256k & 1024k & \$3.85\tabularnewline
\bottomrule
\end{longtable}
-nRF52832 Cortex-M4F 32k 256k \$2.54 64k 512k \$2.59 High performance
-Bluetooth 4/ANT/2.4GHz SoC
-
-nRF52840 Cortex-M4F 256k 1024k \$3.85 Advanced multi-protocol
-System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz
-proprietary
+\begin{itemize}
+\tightlist
+\item
+ nRF52810: High performance, entry-level Bluetooth 4/ANT/2.4GHz SoC
+\item
+ nRF52832: High performance Bluetooth 4/ANT/2.4GHz SoC
+\item
+ nRF52840: Advanced multi-protocol System-on-Chip Supporting: Bluetooth
+ 5, ANT/ANT+, 802.15.4 and 2.4GHz proprietary
+\end{itemize}
\note{All quantities are 1000 pieces
@@ -131,12 +144,70 @@ https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?k=nrf51
nRF52832: these have different packagings, not only difference price
-https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?FV=1c0001\%2Cffe0036f\&quantity=3000\&ColumnSort=1000011\&page=1\&k=nrf52832\&pageSize=500\&pkeyword=nrf52810}
+https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?FV=1c0001\%2Cffe0036f\&quantity=3000\&ColumnSort=1000011\&page=1\&k=nrf52832\&pageSize=500\&pkeyword=nrf52810
+
+nRF52810: High performance, entry-level Bluetooth 4/ANT/2.4GHz SoC
+nRF52832: High performance Bluetooth 4/ANT/2.4GHz SoC nRF52840: Advanced
+multi-protocol System-on-Chip Supporting: Bluetooth 5, ANT/ANT+,
+802.15.4 and 2.4GHz proprietary}
+
+\end{frame}
+
+\begin{frame}{IoT Devices - LoRA}
+\protect\hypertarget{iot-devices---lora}{}
+
+\begin{block}{Modules}
+
+\begin{longtable}[]{@{}lll@{}}
+\toprule
+Module & Data Rate & Price\tabularnewline
+\midrule
+\endhead
+RN2483A-I/RM104 & & \$12.05 @ 250\tabularnewline
+CMWX1ZZABZ-078 & SX1276 & \$10.74 @ 1000\tabularnewline
+RF-LORA-868-SO & SX1272 & \$16.55 @ 1000\tabularnewline
+\bottomrule
+\end{longtable}
+
+\end{block}
+
+\begin{block}{Chips}
+
+\begin{longtable}[]{@{}ll@{}}
+\toprule
+Chip & Price\tabularnewline
+\midrule
+\endhead
+SX1281 & \$3.23\tabularnewline
+SX1272 & \$4.25\tabularnewline
+SX1276 & \$4.25\tabularnewline
+SX1279 & \$4.74\tabularnewline
+\bottomrule
+\end{longtable}
+
+\note{These modules require an external MCU, so does the chips.}
+
+\end{block}
\end{frame}
-\begin{frame}{Typical IoT chips - Wi-Fi}
-\protect\hypertarget{typical-iot-chips---wi-fi}{}
+\begin{frame}{IoT Devices - NB-IoT}
+\protect\hypertarget{iot-devices---nb-iot}{}
+
+\begin{longtable}[]{@{}ll@{}}
+\toprule
+Module & Price\tabularnewline
+\midrule
+\endhead
+uBlox SARA-N210 & \textasciitilde{}\$10 @ 100\tabularnewline
+Sierra Wireless HL7800\_1103933 & \$15.72\tabularnewline
+\bottomrule
+\end{longtable}
+
+\end{frame}
+
+\begin{frame}{IoT Devices - Wi-Fi}
+\protect\hypertarget{iot-devices---wi-fi}{}
\begin{longtable}[]{@{}llllll@{}}
\toprule
@@ -963,6 +1034,8 @@ releases at the same time.}
\begin{frame}{Assignment 1: Blink a led}
\protect\hypertarget{assignment-1-blink-a-led}{}
+\includegraphics{../arduino/assignment-1/solution/assignment-1_bb.pdf}
+
\end{frame}
\begin{frame}{Assignment 2: Connect to Wi-Fi}
diff --git a/slides/what-is-iot-text.pdf b/slides/what-is-iot-text.pdf
index 8270d3e..6d02221 100644
--- a/slides/what-is-iot-text.pdf
+++ b/slides/what-is-iot-text.pdf
Binary files differ
diff --git a/slides/what-is-iot.md b/slides/what-is-iot.md
index 341e4d4..edc3940 100644
--- a/slides/what-is-iot.md
+++ b/slides/what-is-iot.md
@@ -53,38 +53,36 @@ What differentiates a computer from an IoT device?
* CPU
* Network bandwidth and/or latency
* Storage
-* Connected
+* Has connectivity
* Bluetooth
* Wi-Fi
* NB-IoT
* LTE Cat-M
-<!-- -->
- * IR
- * UART
- * CAN
+ * LoRA
+ * Proprietary radio
::: notes
+* IR
+* UART
+* CAN
+Sparkfun and Adafruit etc sell modules with all of these technologies.
:::
-## Typical IoT chips - Bluetooth 4/5
+## IoT Devices - Bluetooth 4/5 chips
-!comment
-~~~
-~~~
Chip CPU Freq RAM Flash Price
-------- -------- ---- -------- ------ ------
nRF52810 Cortex-M4 64 MHz 24k 192k $1.88
-High performance, entry-level Bluetooth 4/ANT/2.4GHz SoC
-
nRF52832 Cortex-M4F 32k 256k $2.54
64k 512k $2.59
-High performance Bluetooth 4/ANT/2.4GHz SoC
-
nRF52840 Cortex-M4F 256k 1024k $3.85
-Advanced multi-protocol System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz proprietary
+
+* nRF52810: High performance, entry-level Bluetooth 4/ANT/2.4GHz SoC
+* nRF52832: High performance Bluetooth 4/ANT/2.4GHz SoC
+* nRF52840: Advanced multi-protocol System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz proprietary
::: notes
@@ -96,9 +94,45 @@ nRF52832: these have different packagings, not only difference price
https://www.digikey.no/products/en/rf-if-and-rfid/rf-transceiver-ics/879?FV=1c0001%2Cffe0036f&quantity=3000&ColumnSort=1000011&page=1&k=nrf52832&pageSize=500&pkeyword=nrf52810
+nRF52810: High performance, entry-level Bluetooth 4/ANT/2.4GHz SoC
+nRF52832: High performance Bluetooth 4/ANT/2.4GHz SoC
+nRF52840: Advanced multi-protocol System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz proprietary
+
+:::
+
+## IoT Devices - LoRA
+
+### Modules
+
+Module Data Rate Price
+----- --------- ------
+RN2483A-I/RM104 $12.05 @ 250
+CMWX1ZZABZ-078 SX1276 $10.74 @ 1000
+RF-LORA-868-SO SX1272 $16.55 @ 1000
+
+### Chips
+
+Chip Price
+---- -------
+SX1281 $3.23
+SX1272 $4.25
+SX1276 $4.25
+SX1279 $4.74
+
+::: notes
+
+These modules require an external MCU, so does the chips.
+
:::
-## Typical IoT chips - Wi-Fi
+## IoT Devices - NB-IoT
+
+Module Price
+------ -----
+uBlox SARA-N210 ~$10 @ 100
+Sierra Wireless HL7800_1103933 $15.72
+
+## IoT Devices - Wi-Fi
Chip CPU Freq ROM RAM Price
----- ------- ------- ----- ------ ------
@@ -305,7 +339,7 @@ Version 3.1.1 er den som gjelder, V 3.1 er rar, de andre finnes ikke (før stand
## MQTT - The protocol
-Agents have one of two roles:
+Agents have one of two roles:
* *Client*
* Publishes *messages*
@@ -501,6 +535,7 @@ In between are:
## Assignment 1: Blink a led
+
## Assignment 2: Connect to Wi-Fi
## Assignment 3: Connect to MQTT broker