aboutsummaryrefslogtreecommitdiff
path: root/assignments
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-04-25 23:28:02 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-04-25 23:28:02 +0200
commit129a22667006ec4f7ebca9c9d5b8e4d492103304 (patch)
tree991035d5d48d4fa3ce5774177e304d2d16dac779 /assignments
parent4bae244f426a39951f404af8f752f715a151f20e (diff)
downloadiot-workshop-129a22667006ec4f7ebca9c9d5b8e4d492103304.tar.gz
iot-workshop-129a22667006ec4f7ebca9c9d5b8e4d492103304.tar.bz2
iot-workshop-129a22667006ec4f7ebca9c9d5b8e4d492103304.tar.xz
iot-workshop-129a22667006ec4f7ebca9c9d5b8e4d492103304.zip
wip
Diffstat (limited to 'assignments')
-rw-r--r--assignments/Makefile14
-rw-r--r--assignments/Makefile.assignment8
-rw-r--r--assignments/README.md60
-rw-r--r--assignments/README.pdfbin0 -> 112702 bytes
-rw-r--r--assignments/blink-a-led/Makefile4
-rw-r--r--assignments/blink-a-led/blink-a-led.pdfbin703496 -> 703496 bytes
6 files changed, 71 insertions, 15 deletions
diff --git a/assignments/Makefile b/assignments/Makefile
index c7ae828..24208f2 100644
--- a/assignments/Makefile
+++ b/assignments/Makefile
@@ -1,5 +1,13 @@
-AS=01-blink-a-led
+AS=blink-a-led
-BASEDIR=$(CURDIR)
+PDFS=$(foreach A,$(AS),$(A)/$(A).pdf)
-include $(patsubst %,%/Makefile,$(AS))
+all: README.pdf $(PDFS)
+
+README.pdf: README.md
+$(eval $(foreach A,$(AS),$(A)/$(A).pdf: $(A)/$(A).md))
+
+%.pdf: %.md
+ cd $(dir $<); pandoc $(notdir $<) -o $(notdir $@)
+
+#$(patsubst )/%,%,$<) -o $(patsubst $(DIR)/%,%,$@)
diff --git a/assignments/Makefile.assignment b/assignments/Makefile.assignment
deleted file mode 100644
index d05662f..0000000
--- a/assignments/Makefile.assignment
+++ /dev/null
@@ -1,8 +0,0 @@
-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/assignments/README.md b/assignments/README.md
new file mode 100644
index 0000000..b420798
--- /dev/null
+++ b/assignments/README.md
@@ -0,0 +1,60 @@
+# Assignment preparations
+
+## Install Arduino IDE
+
+Download and install from https://www.arduino.cc/en/Main/Software. The
+workshop is tested with version 1.8.5.
+
+## Install ESP8266 board support
+
+Follow the instructions on
+https://github.com/esp8266/Arduino#installing-with-boards-manager
+
+## Testing the Arduino installation
+
+In the menu Tools -> Board there should be a list of "ESP8266 boards"
+which should include "NodeMCU 1.0 (ESP-12E Module)".
+
+## Install some libraries
+
+* PubSubClient
+* Time
+* TimeAlarms
+
+## Install Python 3
+
+Use your favorite package manager or download from
+https://www.python.org/downloads/. Make sure `virtualenv` is
+installed.
+
+### Create a virtualenv for the assignments
+
+On Windows you might not need the `-p python3` argument.
+
+ $ cd host
+ $ virtualenv -p python3 env
+ $ env/bin/pip install -r requirements.txt
+
+To test that everything was properly installed run python and execute
+`import asyncore`:
+
+ $ env/bin/python
+ Python 3.6.5rc1 (default, Mar 14 2018, 06:54:23)
+ [GCC 7.3.0] on linux
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> import asyncore
+
+## Install Mosquitto
+
+Either install Mosquitto server and client packages from your
+platform's package manager or download and follow the instructions
+from https://mosquitto.org/.
+
+After installation you should have the commands `mosquitto_pub` and
+`mosquitto_sub` available.
+
+## Install Wireshark (optional)
+
+Either install the Wireshark packages from your platform's package
+manager or download and follow the instructions
+https://www.wireshark.org/.
diff --git a/assignments/README.pdf b/assignments/README.pdf
new file mode 100644
index 0000000..a65c448
--- /dev/null
+++ b/assignments/README.pdf
Binary files differ
diff --git a/assignments/blink-a-led/Makefile b/assignments/blink-a-led/Makefile
deleted file mode 100644
index b015ec1..0000000
--- a/assignments/blink-a-led/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-DIR=01-blink-a-led
-A=blink-a-led
-
-include $(BASEDIR)/Makefile.assignment
diff --git a/assignments/blink-a-led/blink-a-led.pdf b/assignments/blink-a-led/blink-a-led.pdf
index de719fd..c963e79 100644
--- a/assignments/blink-a-led/blink-a-led.pdf
+++ b/assignments/blink-a-led/blink-a-led.pdf
Binary files differ