From 129a22667006ec4f7ebca9c9d5b8e4d492103304 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 25 Apr 2018 23:28:02 +0200 Subject: wip --- assignments/Makefile | 14 ++++++-- assignments/Makefile.assignment | 8 ----- assignments/README.md | 60 ++++++++++++++++++++++++++++++++ assignments/README.pdf | Bin 0 -> 112702 bytes assignments/blink-a-led/Makefile | 4 --- assignments/blink-a-led/blink-a-led.pdf | Bin 703496 -> 703496 bytes 6 files changed, 71 insertions(+), 15 deletions(-) delete mode 100644 assignments/Makefile.assignment create mode 100644 assignments/README.md create mode 100644 assignments/README.pdf delete mode 100644 assignments/blink-a-led/Makefile (limited to 'assignments') 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 Binary files /dev/null and b/assignments/README.pdf 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 Binary files a/assignments/blink-a-led/blink-a-led.pdf and b/assignments/blink-a-led/blink-a-led.pdf differ -- cgit v1.2.3