diff --git a/02 Using the I2C Protocol.md b/02 Using the I2C Protocol.md
index 38980a8..4435568 100644
--- a/02 Using the I2C Protocol.md
+++ b/02 Using the I2C Protocol.md
@@ -146,3 +146,12 @@ If we want the script to run automatically we need to add it as a _cron_ task. W
This tells the crontab to run the script when the device boots. The `&` character runs the script in the background. Try rebooting the server, you should see the information displayed as soon as the reboot is complete.
## 3 Reading Data from a Sensor
+
+In this task you will be adding a GY-61 ADXL335 / 345 Module which can be used to measure the angle of the raspberry pi.
+
+- TC74 temperature sensor
+- VEML6070 UV light sensor
+- TSL2561 light sensor
+- 4 channel ADC
+- BMP280 temperature/humidity (also SPI)
+- HMC5883L Compass
diff --git a/03 Using the SPI Protocol.md b/03 Using the SPI Protocol.md
new file mode 100644
index 0000000..b622f88
--- /dev/null
+++ b/03 Using the SPI Protocol.md
@@ -0,0 +1,12 @@
+
+# Using the SPI Protocol
+
+- Display using the e-ink screen?
+- Writing to an SD card?
+
+Sensors
+
+- RFID
+- ADXL345 3-axis accelerometer tilt sensor (also I2C)
+- BMP280 temperature/humidity (also I2C)
+- CD74HC4067 CMOS 16 Channel Digital Analog Multiplexer
diff --git a/03 Creating an MQTT Broker.md b/05 Creating an MQTT Broker.md
similarity index 100%
rename from 03 Creating an MQTT Broker.md
rename to 05 Creating an MQTT Broker.md
diff --git a/exercises/01_arduino/power/ac_current.cpp b/exercises/01_arduino/power/ac_current.cpp
deleted file mode 100644
index bf4fd13..0000000
--- a/exercises/01_arduino/power/ac_current.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-
-const unsigned int numReadings = 200; //samples to calculate Vrms.
-
-int readingsVClamp[numReadings]; // samples of the sensor SCT-013-000
-int readingsGND[numReadings]; // samples of the virtualground
-float SumSqGND = 0;
-float SumSqVClamp = 0;
-float total = 0;
-
-
-int PinVClamp = A0; // Sensor SCT-013-000
-int PinVirtGND = A1; // Virtualground
-
-void setup() {
- Serial.begin(9600);
- // initialize all the readings to 0:
- for (int thisReading = 0; thisReading < numReadings; thisReading++) {
- readingsVClamp[thisReading] = 0;
- readingsGND[thisReading] = 0;
- }
-}
-
-void loop() {
- unsigned int i=0;
- SumSqGND = 0;
- SumSqVClamp = 0;
- total = 0;
-
- for (unsigned int i=0; i
-
-
-
-
- Simple MQTT Client
-
-
-
-
-
-
-
-
Simple MQTT Client
-
-
-
-
diff --git a/exercises/02_mqtt/web/chat/module.js b/exercises/02_mqtt/web/chat/module.js
deleted file mode 100644
index 947f4c7..0000000
--- a/exercises/02_mqtt/web/chat/module.js
+++ /dev/null
@@ -1,33 +0,0 @@
-
-'use strict'
-
-/* eslint no-unused-vars: 0 */
-
-const messages = ( function() {
- let msgs = []
- return {
- extractData: payloadString => {
- return payloadString
- },
- add: data => {
- if(data === '') throw new Error('empty string parameter')
- msgs[0] = data
- },
- get html() {
- let html = ''
- for(const msg of msgs) {
- html += `
')
- })
-
- })
-
- describe('all', () => {
-
- beforeEach( () => messages.clear())
-
- it('when adding a single message', () => {
- messages.add('hello world')
- const msgs = messages.all
- expect(Array.isArray(msgs)).toBeTruthy()
- expect(msgs.length).toBe(1)
- })
-
- it('when adding multiple messages', () => {
- messages.add('hello')
- messages.add('goodbye')
- const msgs = messages.all
- expect(Array.isArray(msgs)).toBeTruthy()
- expect(msgs.length).toBe(1)
- })
-
- })
-
- describe('count', () => {
-
- it('when adding a single message', () => {
- messages.add('hello world')
- expect(messages.count).toBe(1)
- })
-
- it('when adding multiple messages', () => {
- messages.add('hello')
- messages.add('goodbye')
- expect(messages.count).toBe(1)
- })
-
- })
-
-})
-
-describe('methods', () => {
- describe('extractData', () => {
-
- it('returns the message', () => {
- const msg = messages.extractData('Hello World')
- expect(msg).toBe('Hello World')
- })
-
- })
-
- describe('addMessage', () => {
-
- beforeEach( () => messages.clear())
-
- it('add a single message', () => {
- messages.add('hello world')
- expect(messages.count).toBe(1)
- const msgs = messages.all
- expect(msgs[0]).toBe('hello world')
- })
-
- it('adding multiple messages', () => {
- messages.add('hello')
- messages.add('goodbye')
- expect(messages.count).toBe(1)
- const msgs = messages.all
- expect(msgs[0]).toBe('goodbye')
- })
-
- it('adding an empty message should throw an error', () => {
- try {
- messages.add('')
- expect(1).toBe(0) // this line should not be run!
- } catch(err) {
- expect(err.message).toBe('empty string parameter')
- }
- })
-
- })
-
- describe('clear', () => {
-
- it('clearing a single message', () => {
- messages.add('hello world')
- messages.clear()
- expect(messages.count).toBe(0)
- })
-
- it('clearing multiple messages', () => {
- messages.add('hello')
- messages.add('goodbye')
- messages.clear()
- expect(messages.count).toBe(0)
- })
-
- })
-
-})
diff --git a/exercises/02_mqtt/web/chat/test/testrunner.html b/exercises/02_mqtt/web/chat/test/testrunner.html
deleted file mode 100644
index 02d8362..0000000
--- a/exercises/02_mqtt/web/chat/test/testrunner.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
- Running Jasmine tests in the browser
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/exercises/02_mqtt/web/maps/index.html b/exercises/02_mqtt/web/maps/index.html
deleted file mode 100644
index e6fac7a..0000000
--- a/exercises/02_mqtt/web/maps/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/exercises/02_mqtt/web/maps/map.js b/exercises/02_mqtt/web/maps/map.js
deleted file mode 100644
index 7bd1c03..0000000
--- a/exercises/02_mqtt/web/maps/map.js
+++ /dev/null
@@ -1,46 +0,0 @@
-
-'use strict'
-
-let map
-
-function loadMap() {
- const mapOptions = {
- center:new google.maps.LatLng(52.4080, -1.5104),
- zoom:12,
- mapTypeId:google.maps.MapTypeId.ROADMAP
- }
- map = new google.maps.Map(document.getElementById('sample'),mapOptions)
- if (navigator.geolocation) {
- navigator.geolocation.getCurrentPosition( position => {
- console.log(`current location: ${position.coords.latitude}, ${position.coords.longitude}`)
- map.setCenter(new google.maps.LatLng(position.coords.latitude, position.coords.longitude))
- })
- }
-}
-
-google.maps.event.addDomListener(window, 'load', loadMap)
-
-// ------- MQTT STUFF
-
-const client = new Messaging.Client('broker.mqttdashboard.com', 8000, `myclientid_${parseInt(Math.random() * 100, 10)}`)
-
-client.onConnectionLost = responseObject => console.log(`connection lost: ${responseObject.errorMessage}`)
-
-client.onMessageArrived = message => {
- const data = maps.extractData(message.payloadString)
- maps.addMarker(data)
- maps.scale(map)
- //scaleMap()
-}
-
-const options = {
- timeout: 3,
- onSuccess: () => {
- console.log('connected')
- client.subscribe('cov/map', {qos: 2})
- console.log('Subscribed')
- },
- onFailure: message => console.log(`Connection failed: ${message.errorMessage}`)
-}
-
-client.connect(options)
diff --git a/exercises/02_mqtt/web/maps/module.js b/exercises/02_mqtt/web/maps/module.js
deleted file mode 100644
index 93c242e..0000000
--- a/exercises/02_mqtt/web/maps/module.js
+++ /dev/null
@@ -1,46 +0,0 @@
-
-'use strict'
-
-const maps = (function() {
-
- const markers = []
-
- return {
- extractData: payloadString => {
- try {
- const data = JSON.parse(payloadString)
- return data
- } catch(err) {
- if(err.message === 'Unexpected token h in JSON at position 0') {
- throw new Error('parameter is not a json string')
- }
- throw new Error(err) // we need to propagate all other errors
- }
- },
- addMarker: data => {
- const latLng = new google.maps.LatLng(data.lat, data.lon)
- const mkr = { position: latLng, title: data.label }
- const marker = new google.maps.Marker(mkr)
- markers.push(marker)
- return marker
- },
- get all() {
- return markers
- },
- scale: map => {
- let bounds = new google.maps.LatLngBounds()
- const markers = maps.all
- for (var i = 0; i < markers.length; i++) {
- markers[i].setMap(map)
- bounds.extend(markers[i].getPosition())
- }
- map.fitBounds(bounds)
- console.log(`zoom level: ${map.getZoom()}`)
- if(map.getZoom() > 16) map.setZoom(16)
- const currentBounds = map.getBounds()
- console.log(JSON.stringify(currentBounds, null, 2))
- return currentBounds
- }
- }
-
-})()
diff --git a/exercises/02_mqtt/web/maps/style.css b/exercises/02_mqtt/web/maps/style.css
deleted file mode 100644
index 88cc536..0000000
--- a/exercises/02_mqtt/web/maps/style.css
+++ /dev/null
@@ -1,5 +0,0 @@
-
-#sample {
- width:800px;
- height:400px;
-}
\ No newline at end of file
diff --git a/exercises/02_mqtt/web/maps/test/module.test.js b/exercises/02_mqtt/web/maps/test/module.test.js
deleted file mode 100644
index c95cff0..0000000
--- a/exercises/02_mqtt/web/maps/test/module.test.js
+++ /dev/null
@@ -1,66 +0,0 @@
-
-'use strict'
-
-/* eslint no-undef: 0 */
-
-describe('check encapsulation', () => {
- it('check markers array is private', () => {
- try {
- const data = markers
- expect(1).toBe(0) // this line should not be run!
- console.log(data)
- } catch(err) {
- expect(err.message).toBe('markers is not defined')
- }
- })
-
- describe('properties', () => {
-
- describe('all', () => {
-
- it('check for an empty array', () => {
- const pins = maps.all
- console.log(pins)
- expect(Array.isArray(pins)).toBeTruthy()
- expect(pins.length).toBe(0)
- })
-
- })
-
- })
-
- describe('methods', () => {
-
- describe('extractData', () => {
-
- it('extracts complete data', () => {
- const str = '{"lat": 52.4082, "lon": -1.5071, "label": "cathedral"}'
- const data = maps.extractData(str)
- expect(typeof data).toBe('object')
- expect(Object.keys(data).length).toBe(3)
- expect(data.lat).toBe(52.4082)
- expect(data.lon).toBe(-1.5071)
- expect(data.label).toBe('cathedral')
- })
-
- it('throw error if parameter is not a json string', () => {
- try {
- maps.extractData('hello world')
- expect(0).toBe(1)
- } catch(err) {
- expect(err.message).toBe('parameter is not a json string')
- }
- })
-
- })
-
- describe('addMarker', () => {
-
- })
-
- describe('scale', () => {
-
- })
-
- })
-})
diff --git a/exercises/02_mqtt/web/maps/test/testrunner.html b/exercises/02_mqtt/web/maps/test/testrunner.html
deleted file mode 100644
index 960a908..0000000
--- a/exercises/02_mqtt/web/maps/test/testrunner.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
- Running Jasmine tests in the browser
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/exercises/02_tdd/temp/lib/avg/avg.cpp b/exercises/02_tdd/temp/lib/avg/avg.cpp
deleted file mode 100644
index 8f42f07..0000000
--- a/exercises/02_tdd/temp/lib/avg/avg.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#include
-
-int readings[6];
-int index = 0;
-
-void avg_add(int a) {
- readings[index] = a;
- index++;
-}
-
-int avg_get() {
- return 0;
-}
-
-void avg_clear() {
- index = 0;
-}
diff --git a/exercises/02_tdd/temp/lib/avg/avg.h b/exercises/02_tdd/temp/lib/avg/avg.h
deleted file mode 100644
index 1cb0d01..0000000
--- a/exercises/02_tdd/temp/lib/avg/avg.h
+++ /dev/null
@@ -1,9 +0,0 @@
-
-#ifndef __AVG_H
-#define __AVG_H
-
-void avg_add(int a);
-int avg_get();
-void avg_clear();
-
-#endif
diff --git a/exercises/02_tdd/temp/lib/readme.txt b/exercises/02_tdd/temp/lib/readme.txt
deleted file mode 100644
index cfa16df..0000000
--- a/exercises/02_tdd/temp/lib/readme.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-
-This directory is intended for project specific (private) libraries.
-PlatformIO will compile them to static libraries and link them to executable files.
-
-The source code of each library should be placed in separate directories, like
-"lib/private_lib/[here are source files]".
-
-For example, see the structure of the following two libraries `Foo` and `Bar`:
-
-|--lib
-| |
-| |--Bar
-| | |--docs
-| | |--examples
-| | |--src
-| | |- Bar.c
-| | |- Bar.h
-| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
-| |
-| |--Foo
-| | |- Foo.c
-| | |- Foo.h
-| |
-| |- readme.txt --> THIS FILE
-|
-|- platformio.ini
-|--src
- |- main.c
-
-Then in `src/main.c` you should use:
-
-#include
-#include
-
-// rest H/C/CPP code
-
-PlatformIO will find your libraries automatically, configure preprocessor's
-include paths and build them.
-
-More information about PlatformIO Library Dependency Finder
-- https://docs.platformio.org/page/librarymanager/ldf.html
diff --git a/exercises/02_tdd/temp/platformio.ini b/exercises/02_tdd/temp/platformio.ini
deleted file mode 100644
index 64027ca..0000000
--- a/exercises/02_tdd/temp/platformio.ini
+++ /dev/null
@@ -1,23 +0,0 @@
-; PlatformIO Project Configuration File
-;
-; Please visit documentation for the other options and examples
-; https://docs.platformio.org/page/projectconf.html
-
-;monitor_speed = 9600
-
-[env:nodemcuv2]
-platform = espressif8266
-board = nodemcuv2
-framework = arduino
-; upload_port = /dev/ttyUSB0
-upload_speed = 57600 ; 9600 14400 19200 28800 38400 57600 115200
-
-[env:lolin32]
-platform = espressif32
-board = lolin32
-framework = arduino
-; upload_port = /dev/ttyUSB0
-upload_speed = 115200 ; 9600 14400 19200 28800 38400 57600 115200
-
-[env:native]
-platform = native
diff --git a/exercises/02_tdd/temp/readme.md b/exercises/02_tdd/temp/readme.md
deleted file mode 100644
index b595362..0000000
--- a/exercises/02_tdd/temp/readme.md
+++ /dev/null
@@ -1,22 +0,0 @@
-
-# Notes
-
-The platformio commands are stored in this directory:
-
-~/.platformio/penv/bin
-
-commands:
-
-Starting a project for the NodeMCU v2 environment:
-
-platformio init -b nodemcuv2
-
-To flash to a device:
-
-$ pio run -e nodemcuv2
-
-HOw to run the tests:
-
-~/.platformio/penv/bin/pio test -e native
-
-https://www.thingforward.io/techblog/2017-07-25-starting-embedded-testing-with-platformio.html
diff --git a/exercises/02_tdd/temp/src/main.cpp b/exercises/02_tdd/temp/src/main.cpp
deleted file mode 100644
index a36d148..0000000
--- a/exercises/02_tdd/temp/src/main.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#ifndef UNIT_TEST
-
-#include
-#include
-
-long randNumber;
-
-void setup() {
- Serial.begin(9600);
- pinMode(LED_BUILTIN, OUTPUT);
- randomSeed(analogRead(0));
-}
-
-void loop() {
- randNumber = random(10, 20);
- Serial.println(randNumber);
- digitalWrite(LED_BUILTIN, HIGH);
- delay(1000);
- digitalWrite(LED_BUILTIN, LOW);
- delay(1000);
-}
-
-#endif
diff --git a/exercises/02_tdd/temp/test/test_desktop/test_avg.cpp b/exercises/02_tdd/temp/test/test_desktop/test_avg.cpp
deleted file mode 100644
index e78d58d..0000000
--- a/exercises/02_tdd/temp/test/test_desktop/test_avg.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#ifdef UNIT_TEST
-
-#include
-
-#include "avg.h"
-
-void test_add_single_val() {
- int val = 42;
- avg_add(val);
- TEST_ASSERT_EQUAL(avg_get(), 42);
-}
-
-int main( int argc, char **argv) {
- UNITY_BEGIN();
- RUN_TEST(test_add_single_val);
- UNITY_END();
-}
-
-#endif
diff --git a/exercises/MQTT/mqtt.crt b/exercises/05_mqtt/mqtt.crt
similarity index 100%
rename from exercises/MQTT/mqtt.crt
rename to exercises/05_mqtt/mqtt.crt
diff --git a/exercises/MQTT/mqtt.crt.zip b/exercises/05_mqtt/mqtt.crt.zip
similarity index 100%
rename from exercises/MQTT/mqtt.crt.zip
rename to exercises/05_mqtt/mqtt.crt.zip
diff --git a/exercises/MQTT/arduino/ESP32-MQTT-TLS/.gitignore b/exercises/MQTT/arduino/ESP32-MQTT-TLS/.gitignore
deleted file mode 100644
index 2de98ab..0000000
--- a/exercises/MQTT/arduino/ESP32-MQTT-TLS/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.pio
-.pioenvs
-.piolibdeps
-.vscode/.browse.c_cpp.db*
-.vscode/c_cpp_properties.json
-.vscode/launch.json
diff --git a/exercises/MQTT/arduino/ESP32-MQTT-TLS/include/README b/exercises/MQTT/arduino/ESP32-MQTT-TLS/include/README
deleted file mode 100644
index 194dcd4..0000000
--- a/exercises/MQTT/arduino/ESP32-MQTT-TLS/include/README
+++ /dev/null
@@ -1,39 +0,0 @@
-
-This directory is intended for project header files.
-
-A header file is a file containing C declarations and macro definitions
-to be shared between several project source files. You request the use of a
-header file in your project source file (C, C++, etc) located in `src` folder
-by including it, with the C preprocessing directive `#include'.
-
-```src/main.c
-
-#include "header.h"
-
-int main (void)
-{
- ...
-}
-```
-
-Including a header file produces the same results as copying the header file
-into each source file that needs it. Such copying would be time-consuming
-and error-prone. With a header file, the related declarations appear
-in only one place. If they need to be changed, they can be changed in one
-place, and programs that include the header file will automatically use the
-new version when next recompiled. The header file eliminates the labor of
-finding and changing all the copies as well as the risk that a failure to
-find one copy will result in inconsistencies within a program.
-
-In C, the usual convention is to give header files names that end with `.h'.
-It is most portable to use only letters, digits, dashes, and underscores in
-header file names, and at most one dot.
-
-Read more about using header files in official GCC documentation:
-
-* Include Syntax
-* Include Operation
-* Once-Only Headers
-* Computed Includes
-
-https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html
diff --git a/exercises/MQTT/arduino/ESP32-MQTT-TLS/lib/README b/exercises/MQTT/arduino/ESP32-MQTT-TLS/lib/README
deleted file mode 100644
index 6debab1..0000000
--- a/exercises/MQTT/arduino/ESP32-MQTT-TLS/lib/README
+++ /dev/null
@@ -1,46 +0,0 @@
-
-This directory is intended for project specific (private) libraries.
-PlatformIO will compile them to static libraries and link into executable file.
-
-The source code of each library should be placed in a an own separate directory
-("lib/your_library_name/[here are source files]").
-
-For example, see a structure of the following two libraries `Foo` and `Bar`:
-
-|--lib
-| |
-| |--Bar
-| | |--docs
-| | |--examples
-| | |--src
-| | |- Bar.c
-| | |- Bar.h
-| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
-| |
-| |--Foo
-| | |- Foo.c
-| | |- Foo.h
-| |
-| |- README --> THIS FILE
-|
-|- platformio.ini
-|--src
- |- main.c
-
-and a contents of `src/main.c`:
-```
-#include
-#include
-
-int main (void)
-{
- ...
-}
-
-```
-
-PlatformIO Library Dependency Finder will find automatically dependent
-libraries scanning project source files.
-
-More information about PlatformIO Library Dependency Finder
-- https://docs.platformio.org/page/librarymanager/ldf.html
diff --git a/exercises/MQTT/arduino/ESP32-MQTT-TLS/platformio.ini b/exercises/MQTT/arduino/ESP32-MQTT-TLS/platformio.ini
deleted file mode 100644
index 30d108f..0000000
--- a/exercises/MQTT/arduino/ESP32-MQTT-TLS/platformio.ini
+++ /dev/null
@@ -1,30 +0,0 @@
-; PlatformIO Project Configuration File
-;
-; Build options: build flags, source filter
-; Upload options: custom upload port, speed and extra flags
-; Library options: dependencies, extra library storages
-; Advanced options: extra scripting
-;
-; Please visit documentation for the other options and examples
-; https://docs.platformio.org/page/projectconf.html
-
-[env:lolin32]
-platform = espressif32
-board = lolin32
-framework = arduino
-
-lib_deps =
- Wire
- Time
- ESP8266_SSD1306
- PubSubClient
-
-
-build_flags =
- -IC:/Users/Chris/.platformio/lib/ESP8266_SSD1306_ID562/
- -IC:/Users/Chris/.platformio/lib/Time_ID44/
-
-;; http://docs.platformio.org/en/latest/projectconf/section_env_build.html#src-filter
-src_filter =
- +<*> -<.git/> - - - - -
- -
diff --git a/exercises/MQTT/arduino/ESP32-MQTT-TLS/src/main.cpp b/exercises/MQTT/arduino/ESP32-MQTT-TLS/src/main.cpp
deleted file mode 100644
index d583eb3..0000000
--- a/exercises/MQTT/arduino/ESP32-MQTT-TLS/src/main.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-// Chris Bass
-// 24/01/2019
-// ESP32 OLED (Wemos Lolin32)
-// Secure encrypted MQTT with TLS/SSL
-
-#include
-
-#include
-#include
-#include
-
-#include // Only needed for Arduino 1.6.5 and earlier
-#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"`
-
-// Initialize the OLED display using Wire library
-SSD1306 display(0x3c, 5, 4);
-
-// WiFi ssid and password, change it with your ssid and password:
-const char* ssid = "ECL-LEGO-ROBOTS"; // Lego WiFi
-const char* password = "9cjjp64270"; // Lego WiFi
-
-// MQTT IP address of the PC/raspberry where you installed MQTT Server:
-const char* mqttServer = "mqtt.coventry.ac.uk";
-const char* clientId = "ESP32Client"; // unique client ID for this device
-const char* mqttUsername = "add_your_username_here";
-const char* mqttPassword = "add_your_password_here";
-
-// TLS/SSL certificate for encrypted mqtt:
-const char* ca_cert = \
- "-----BEGIN CERTIFICATE-----\n" \
- "MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL\n" \
- "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n" \
- "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00\n" \
- "MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM\n" \
- "aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIgRzMwggIiMA0GCSqG\n" \
- "SIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFhZiFf\n" \
- "qq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMW\n" \
- "n4rjyduYNM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ym\n" \
- "c5GQYaYDFCDy54ejiK2toIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+\n" \
- "O7q414AB+6XrW7PFXmAqMaCvN+ggOp+oMiwMzAkd056OXbxMmO7FGmh77FOm6RQ1\n" \
- "o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+lV0POKa2Mq1W/xPtbAd0j\n" \
- "IaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZoL1NesNKq\n" \
- "IcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz\n" \
- "8eQQsSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43eh\n" \
- "vNURG3YBZwjgQQvD6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l\n" \
- "7ZizlWNof/k19N+IxWA1ksB8aRxhlRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALG\n" \
- "cC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB\n" \
- "BjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZIhvcNAQELBQAD\n" \
- "ggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66\n" \
- "AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RC\n" \
- "roijQ1h5fq7KpVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0Ga\n" \
- "W/ZZGYjeVYg3UQt4XAoeo0L9x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4n\n" \
- "lv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgzdWqTHBLmYF5vHX/JHyPLhGGfHoJE\n" \
- "+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6XU/IyAgkwo1jwDQHV\n" \
- "csaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+NwmNtd\n" \
- "dbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNg\n" \
- "KCLjsZWDzYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeM\n" \
- "HVOyToV7BjjHLPj4sHKNJeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4\n" \
- "WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M\n" \
- "-----END CERTIFICATE-----\n";
-
-
-WiFiClientSecure espClient;
-PubSubClient mqttClient(espClient);
-
-long lastMsg = 0;
-
-// The receivedCallback() function will be invoked when this client receives data about the subscribed topic
-void receivedCallback(char* topic, byte* payload, unsigned int length) {
- Serial.print("Message received: ");
- Serial.println(topic);
-
- Serial.print("payload: ");
- for (int i = 0; i < length; i++) {
- Serial.print((char)payload[i]);
- }
- Serial.println();
-
- display.clear();
- display.drawString(0, 0, "receivedCallback");
- display.drawString(0, 10, "topic: " + String(topic));
- display.drawString(0, 20, "payload:");
- for (int i = 0; i < length; i++) {
- display.drawString(i*6, 30, String((char)payload[i]));
- }
- display.display();
- delay(1000);
-
-}
-
-// Will attempt to connect to MQTT and subscribe to a topic feed
-void mqttConnect() {
- // Loop until reconnected
- while (!mqttClient.connected()) {
-
- display.clear();
- display.drawString(0, 0, "In mqttConnect()");
- display.drawString(0, 10, "MQTT connecting...");
- display.display();
-
- if (mqttClient.connect(clientId, mqttUsername, mqttPassword)) {
- display.drawString(0, 20, "...connected");
- display.display();
- delay(1000);
- // Subscribe topic with default QoS 0
- // Let's just subscribe to the same feed we are publishing to, to see if our message gets recorded.
- mqttClient.subscribe("302CEM/aa6164/mydata"); // topic name MUST be in the format: 302CEM//
- //mqttClient.subscribe("302CEM/aa6164/feeds/mydata2"); // topic name MUST be in the format: 302CEM//
-
- } else {
- display.drawString(0, 20, "...connect failed, status code =");
- display.drawString(0, 30, String(mqttClient.state()));
- display.drawString(0, 40, "try again in 5 seconds");
- display.display();
- delay(5000); // Wait 5 seconds before retrying
- }
- }
-}
-
-void setup() {
- // Initialising the UI will init the display too.
- display.init();
- //display.flipScreenVertically();
- display.setFont(ArialMT_Plain_10);
- display.setTextAlignment(TEXT_ALIGN_LEFT);
- display.clear();
- display.drawString(0, 0, "Hello WiFi");
- display.drawString(0, 10, "Attempting to connect to:");
- display.drawString(0, 20, String(ssid));
- display.display();
- delay(500);
-
- Serial.begin(115200);
- Serial.println();
- Serial.print("Connecting to ");
- Serial.println(ssid);
-
- // We start by connecting to a WiFi network
- WiFi.begin(ssid, password);
-
- while (WiFi.status() != WL_CONNECTED) {
- delay(500);
- Serial.print(".");
- }
-
- Serial.println("");
- Serial.println("WiFi connected");
- Serial.println("IP address: ");
- Serial.println(WiFi.localIP());
-
- display.clear();
- display.drawString(0, 0, "WiFi connected");
- display.drawString(0, 10, "IP address: " + WiFi.localIP().toString());
- display.drawString(0, 20, "Setting up MQTT...");
- display.display();
- delay(3000);
-
- // We need a certificate in order to do a secure TLS/SSL connection to our server
- espClient.setCACert(ca_cert);
-
- // Port 1883 is reserved with IANA for use with MQTT.
- // TCP/IP port 8883 is also registered, for using MQTT over SSL.
- //mqttClient.setServer(mqttServer, 1883);
-
- // help url: http://www.iotsharing.com/2017/08/how-to-use-esp32-mqtts-with-mqtts-mosquitto-broker-tls-ssl.html
- mqttClient.setServer(mqttServer, 8883); // Port 8883 for MQTT over SSL.
-
- // The receivedCallback() function will be invoked when this client receives the subscribed topic:
- mqttClient.setCallback(receivedCallback);
-}
-
-void loop() {
- display.clear();
- display.drawString(0, 0, "Hello world: " + String(millis()));
- display.display();
- delay(10);
-
- // if client was disconnected then try to reconnect again
- if (!mqttClient.connected()) {
- mqttConnect(); // displays on line 0, 1 and 2
- }
- // this function will listen for incoming subscribed topic-process-invoke receivedCallback()
- mqttClient.loop();
-
- // we send a reading every 5 secs
- // we count until 5 secs reached to avoid blocking program if using delay()
- long now = millis();
- if (now - lastMsg > 5000) {
- lastMsg = now;
- String dataToSend = String(millis()); // dataToSend could be a sensor reading instead
- display.drawString(0, 50, "Sending data: " + dataToSend);
- display.display();
- // just convert time stamp to a c-string and send as data:
- mqttClient.publish("302CEM/aa6164/mydata", dataToSend.c_str());
- delay(2000);
- }
-}
-
diff --git a/exercises/MQTT/arduino/ESP32-MQTT-TLS/test/README b/exercises/MQTT/arduino/ESP32-MQTT-TLS/test/README
deleted file mode 100644
index df5066e..0000000
--- a/exercises/MQTT/arduino/ESP32-MQTT-TLS/test/README
+++ /dev/null
@@ -1,11 +0,0 @@
-
-This directory is intended for PIO Unit Testing and project tests.
-
-Unit Testing is a software testing method by which individual units of
-source code, sets of one or more MCU program modules together with associated
-control data, usage procedures, and operating procedures, are tested to
-determine whether they are fit for use. Unit testing finds problems early
-in the development cycle.
-
-More information about PIO Unit Testing:
-- https://docs.platformio.org/page/plus/unit-testing.html
diff --git a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/.gitignore b/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/.gitignore
deleted file mode 100644
index 2de98ab..0000000
--- a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.pio
-.pioenvs
-.piolibdeps
-.vscode/.browse.c_cpp.db*
-.vscode/c_cpp_properties.json
-.vscode/launch.json
diff --git a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/include/README b/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/include/README
deleted file mode 100644
index 194dcd4..0000000
--- a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/include/README
+++ /dev/null
@@ -1,39 +0,0 @@
-
-This directory is intended for project header files.
-
-A header file is a file containing C declarations and macro definitions
-to be shared between several project source files. You request the use of a
-header file in your project source file (C, C++, etc) located in `src` folder
-by including it, with the C preprocessing directive `#include'.
-
-```src/main.c
-
-#include "header.h"
-
-int main (void)
-{
- ...
-}
-```
-
-Including a header file produces the same results as copying the header file
-into each source file that needs it. Such copying would be time-consuming
-and error-prone. With a header file, the related declarations appear
-in only one place. If they need to be changed, they can be changed in one
-place, and programs that include the header file will automatically use the
-new version when next recompiled. The header file eliminates the labor of
-finding and changing all the copies as well as the risk that a failure to
-find one copy will result in inconsistencies within a program.
-
-In C, the usual convention is to give header files names that end with `.h'.
-It is most portable to use only letters, digits, dashes, and underscores in
-header file names, and at most one dot.
-
-Read more about using header files in official GCC documentation:
-
-* Include Syntax
-* Include Operation
-* Once-Only Headers
-* Computed Includes
-
-https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html
diff --git a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/lib/README b/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/lib/README
deleted file mode 100644
index 6debab1..0000000
--- a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/lib/README
+++ /dev/null
@@ -1,46 +0,0 @@
-
-This directory is intended for project specific (private) libraries.
-PlatformIO will compile them to static libraries and link into executable file.
-
-The source code of each library should be placed in a an own separate directory
-("lib/your_library_name/[here are source files]").
-
-For example, see a structure of the following two libraries `Foo` and `Bar`:
-
-|--lib
-| |
-| |--Bar
-| | |--docs
-| | |--examples
-| | |--src
-| | |- Bar.c
-| | |- Bar.h
-| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
-| |
-| |--Foo
-| | |- Foo.c
-| | |- Foo.h
-| |
-| |- README --> THIS FILE
-|
-|- platformio.ini
-|--src
- |- main.c
-
-and a contents of `src/main.c`:
-```
-#include
-#include
-
-int main (void)
-{
- ...
-}
-
-```
-
-PlatformIO Library Dependency Finder will find automatically dependent
-libraries scanning project source files.
-
-More information about PlatformIO Library Dependency Finder
-- https://docs.platformio.org/page/librarymanager/ldf.html
diff --git a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/platformio.ini b/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/platformio.ini
deleted file mode 100644
index 99c5179..0000000
--- a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/platformio.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-; PlatformIO Project Configuration File
-;
-; Build options: build flags, source filter
-; Upload options: custom upload port, speed and extra flags
-; Library options: dependencies, extra library storages
-; Advanced options: extra scripting
-;
-; Please visit documentation for the other options and examples
-; https://docs.platformio.org/page/projectconf.html
-
-[env:lolin32]
-platform = espressif32
-board = lolin32
-framework = arduino
-
-lib_deps =
- RadioHead
- Wire
- ESP8266_SSD1306
-
\ No newline at end of file
diff --git a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/src/receiver.cpp b/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/src/receiver.cpp
deleted file mode 100644
index 793f9ce..0000000
--- a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/src/receiver.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// receiver.cpp
-// Seperate Transmitter and Receiver programs need to be running on seperate ESP32 nodes.
-// Might be possible to run both on a single ESP32 if we make use of threading?
-// This is the receiver.cpp code:
-// Chris Bass
-// 06/03/2019
-
-// Example from RadioHead library to receive messages with a simple ASK.
-// Implements a simplex (one-way) receiver with an Rx-B1 module
-
-#include
-#include
-#include // Not actually used but needed to compile
-
-#include // Only needed for Arduino 1.6.5 and earlier
-#include // alias for `#include "SSD1306Wire.h"`
-
-SSD1306 display(0x3c, 5, 4); // OLED display
-
-// (speed, rxPin, txPin, pttPin);
-RH_ASK driver(2000, 2, 4, 5); // ESP8266 or ESP32: do not use pin 11
-
-void setup()
-{
- Serial.begin(9600); // Debugging only
-
- display.init();
- //display.flipScreenVertically();
- display.setFont(ArialMT_Plain_10);
- display.setTextAlignment(TEXT_ALIGN_LEFT);
- display.clear();
- display.drawString(0, 0, "Hello 433MHz Radio");
- display.drawString(0, 10, "Receive on rxPin 2");
- display.display();
-
- if (!driver.init()) {
- Serial.println("init failed");
- display.drawString(0, 20, "init failed");
- }
-
- display.display();
-
-}
-
-void loop()
-{
- // do a receieve
- uint8_t buf[RH_ASK_MAX_MESSAGE_LEN];
- uint8_t buflen = sizeof(buf);
-
- if (driver.recv(buf, &buflen)) // Non-blocking
- {
- int i;
-
- // Message with a good checksum received, dump it.
- driver.printBuffer("Got:", buf, buflen);
- Serial.println("received...");
-
- display.clear();
- display.drawString(0, 0, "Receiving on rxPin 2");
- display.drawString(0, 10, "Received:");
- std::string toDraw(buf, buf + buflen);
- display.drawString(0, 20, toDraw.c_str());
- display.display();
-
- } else {
- Serial.println("driver.recv() returned false");
- }
-
-
-}
diff --git a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/src/transmitter.cpp b/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/src/transmitter.cpp
deleted file mode 100644
index 6c8a53d..0000000
--- a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/src/transmitter.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// transmitter.cpp
-// Seperate Transmitter and Receiver programs need to be running on seperate ESP32 nodes.
-// Might be possible to run both on a single ESP32 if we make use of threading?
-// This is the transmitter.cpp code
-// Chris Bass
-// 06/03/2019
-
-// Example from RadioHead library to transmit messages with a simple ASK.
-// Implements a simplex (one-way) transmitter with an TX-C1 module
-
-#include
-#include
-#include // Not actually used but needed to compile
-
-#include // Only needed for Arduino 1.6.5 and earlier
-#include // alias for `#include "SSD1306Wire.h"`
-
-#include
-
-SSD1306 display(0x3c, 5, 4); // OLED display
-
-// (speed, rxPin, txPin, pttPin);
-RH_ASK driver(2000, 2, 4, 5); // ESP8266 or ESP32: do not use pin 11
-
-unsigned long previousMillis = 0;
-const long interval = 1000; // interval period at which to transmit (milliseconds)
-
-void setup()
-{
- Serial.begin(9600); // Debugging only
-
- display.init();
- //display.flipScreenVertically();
- display.setFont(ArialMT_Plain_10);
- display.setTextAlignment(TEXT_ALIGN_LEFT);
- display.clear();
- display.drawString(0, 0, "Hello 433MHz Radio");
- display.drawString(0, 10, "Transmit on txPin 4");
- display.display();
-
- if (!driver.init()) {
- Serial.println("init failed");
- display.drawString(0, 20, "init failed");
- }
-
- display.display();
-
-}
-
-void loop()
-{
- // every interval do a transmit:
- unsigned long currentMillis = millis();
- if (currentMillis - previousMillis >= interval) {
- previousMillis = currentMillis;
-
- //const char *msg = "hello"; //(String("hello") + String(millis())).c_str();
- std::string msgToSend;
- std::stringstream ss;
- ss << "hello " << millis();
- msgToSend = ss.str();
- std::vector myVector(msgToSend.begin(), msgToSend.end());
- uint8_t *msgPtr = &myVector[0];
-
- Serial.print("sending...");
- Serial.println(msgToSend.c_str());
-
- display.clear();
- display.drawString(0, 0, "Transmitting from txPin 4");
- display.drawString(0, 10, "Sending:");
- display.drawString(0, 20, msgToSend.c_str());
- display.display();
-
- driver.send(msgPtr, msgToSend.length()); //strlen(msg));
- driver.waitPacketSent();
- delay(200);
- }
-
-}
diff --git a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/test/README b/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/test/README
deleted file mode 100644
index df5066e..0000000
--- a/exercises/MQTT/arduino/ESP32-OLED-433MHz-Radio/test/README
+++ /dev/null
@@ -1,11 +0,0 @@
-
-This directory is intended for PIO Unit Testing and project tests.
-
-Unit Testing is a software testing method by which individual units of
-source code, sets of one or more MCU program modules together with associated
-control data, usage procedures, and operating procedures, are tested to
-determine whether they are fit for use. Unit testing finds problems early
-in the development cycle.
-
-More information about PIO Unit Testing:
-- https://docs.platformio.org/page/plus/unit-testing.html
diff --git a/exercises/MQTT/arduino/blink/.vscode/extensions.json b/exercises/MQTT/arduino/blink/.vscode/extensions.json
deleted file mode 100644
index 8281e64..0000000
--- a/exercises/MQTT/arduino/blink/.vscode/extensions.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- // See http://go.microsoft.com/fwlink/?LinkId=827846
- // for the documentation about the extensions.json format
- "recommendations": [
- "platformio.platformio-ide"
- ]
-}
\ No newline at end of file
diff --git a/exercises/MQTT/arduino/blink/.vscode/settings.json b/exercises/MQTT/arduino/blink/.vscode/settings.json
deleted file mode 100644
index b15d089..0000000
--- a/exercises/MQTT/arduino/blink/.vscode/settings.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "terminal.integrated.env.linux": {
- "PATH": "/home/mtyers/.platformio/penv/bin:/home/mtyers/.platformio/penv:/home/mtyers/.platformio/penv/bin:/home/mtyers/.platformio/penv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
- "PLATFORMIO_CALLER": "vscode"
- }
-}
\ No newline at end of file
diff --git a/exercises/MQTT/arduino/blink/include/readme.txt b/exercises/MQTT/arduino/blink/include/readme.txt
deleted file mode 100644
index 194dcd4..0000000
--- a/exercises/MQTT/arduino/blink/include/readme.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-
-This directory is intended for project header files.
-
-A header file is a file containing C declarations and macro definitions
-to be shared between several project source files. You request the use of a
-header file in your project source file (C, C++, etc) located in `src` folder
-by including it, with the C preprocessing directive `#include'.
-
-```src/main.c
-
-#include "header.h"
-
-int main (void)
-{
- ...
-}
-```
-
-Including a header file produces the same results as copying the header file
-into each source file that needs it. Such copying would be time-consuming
-and error-prone. With a header file, the related declarations appear
-in only one place. If they need to be changed, they can be changed in one
-place, and programs that include the header file will automatically use the
-new version when next recompiled. The header file eliminates the labor of
-finding and changing all the copies as well as the risk that a failure to
-find one copy will result in inconsistencies within a program.
-
-In C, the usual convention is to give header files names that end with `.h'.
-It is most portable to use only letters, digits, dashes, and underscores in
-header file names, and at most one dot.
-
-Read more about using header files in official GCC documentation:
-
-* Include Syntax
-* Include Operation
-* Once-Only Headers
-* Computed Includes
-
-https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html
diff --git a/exercises/MQTT/arduino/blink/lib/readme.txt b/exercises/MQTT/arduino/blink/lib/readme.txt
deleted file mode 100644
index c3fd443..0000000
--- a/exercises/MQTT/arduino/blink/lib/readme.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-
-This directory is intended for project specific (private) libraries.
-PlatformIO will compile them to static libraries and link into executable file.
-
-The source code of each library should be placed in a an own separate directory
-("lib/your_library_name/[here are source files]").
-
-For example, see a structure of the following two libraries `Foo` and `Bar`:
-
-|--lib
-| |
-| |--Bar
-| | |--docs
-| | |--examples
-| | |--src
-| | |- Bar.c
-| | |- Bar.h
-| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
-| |
-| |--Foo
-| | |- Foo.c
-| | |- Foo.h
-| |
-| |- readme.txt --> THIS FILE
-|
-|- platformio.ini
-|--src
- |- main.c
-
-and a contents of `src/main.c`:
-```
-#include
-#include
-
-int main (void)
-{
- ...
-}
-
-```
-
-PlatformIO Library Dependency Finder will find automatically dependent
-libraries scanning project source files.
-
-More information about PlatformIO Library Dependency Finder
-- https://docs.platformio.org/page/librarymanager/ldf.html
diff --git a/exercises/MQTT/arduino/blink/platformio.ini b/exercises/MQTT/arduino/blink/platformio.ini
deleted file mode 100644
index 64027ca..0000000
--- a/exercises/MQTT/arduino/blink/platformio.ini
+++ /dev/null
@@ -1,23 +0,0 @@
-; PlatformIO Project Configuration File
-;
-; Please visit documentation for the other options and examples
-; https://docs.platformio.org/page/projectconf.html
-
-;monitor_speed = 9600
-
-[env:nodemcuv2]
-platform = espressif8266
-board = nodemcuv2
-framework = arduino
-; upload_port = /dev/ttyUSB0
-upload_speed = 57600 ; 9600 14400 19200 28800 38400 57600 115200
-
-[env:lolin32]
-platform = espressif32
-board = lolin32
-framework = arduino
-; upload_port = /dev/ttyUSB0
-upload_speed = 115200 ; 9600 14400 19200 28800 38400 57600 115200
-
-[env:native]
-platform = native
diff --git a/exercises/MQTT/arduino/blink/readme.md b/exercises/MQTT/arduino/blink/readme.md
deleted file mode 100644
index b595362..0000000
--- a/exercises/MQTT/arduino/blink/readme.md
+++ /dev/null
@@ -1,22 +0,0 @@
-
-# Notes
-
-The platformio commands are stored in this directory:
-
-~/.platformio/penv/bin
-
-commands:
-
-Starting a project for the NodeMCU v2 environment:
-
-platformio init -b nodemcuv2
-
-To flash to a device:
-
-$ pio run -e nodemcuv2
-
-HOw to run the tests:
-
-~/.platformio/penv/bin/pio test -e native
-
-https://www.thingforward.io/techblog/2017-07-25-starting-embedded-testing-with-platformio.html
diff --git a/exercises/MQTT/arduino/blink/src/main.cpp b/exercises/MQTT/arduino/blink/src/main.cpp
deleted file mode 100644
index 57403c8..0000000
--- a/exercises/MQTT/arduino/blink/src/main.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#include
-
-long randNumber;
-
-void setup() {
- Serial.begin(9600);
- pinMode(D4, OUTPUT); // NodeMCU: D4, Lolin32: LED_BUILTIN
- randomSeed(analogRead(0));
-}
-
-void loop() {
- randNumber = random(10, 20);
- Serial.println(randNumber);
- digitalWrite(D4, HIGH); // remember to change this for Lolin32
- delay(1000);
- digitalWrite(D4, LOW); // remember to change this for Lolin32
- delay(1000);
-}
diff --git a/exercises/MQTT/arduino/samples/00 Getting Started.md b/exercises/MQTT/arduino/samples/00 Getting Started.md
deleted file mode 100644
index c181d10..0000000
--- a/exercises/MQTT/arduino/samples/00 Getting Started.md
+++ /dev/null
@@ -1,197 +0,0 @@
-
-# Getting Started
-
-This guide is for anyone who has not used the NodeMCU with the Arduino IDE. It covers the setup and configuration of the IDE as well as demonstrating how to use the MQTT protocol to publish data to the Adafruit.io cloud platform.
-
-You will need to install drivers on your computer. Look on the base of the NodeCMU. If it states you need the **2102 driver**, you can download and install it from [here](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers).
-
-Start by downloading and installing the [Arduino IDE](https://www.arduino.cc/en/Main/Software), this is version 1.8.5 at the time of writing.
-
-Next you need to add support for the **ESP8266 NodeMCU Development Board**:
-
-1. Open the Arduino IDE.
-2. Choose the _Arduino > Preferences_ menu
-3. Paste the following into the **Additional Boards Manager** box.
- - `http://arduino.esp8266.com/stable/package_esp8266com_index.json`
-4. Click on OK to close the Preferences window
-5. open the _Tools > Boards > Board manager_ menu.
- - find `esp8266 by esp8266 community` and install.
-6. Open the _Tools > Board_ menu:
- - choose the `NodeMCU 1.0 (ESP12-E Module)`.
-7. Make a note of the available serial ports using the `Tools > Port` menu.
-8. Plug in the NodeMCU development board. This will create a new virtual serial port (on a Mac is is labelled `/dev/cu.SLAB_USBtoUART` or something similar. Check the `Tools > Ports` menu again and select the port that has been added.
-
-## Hello World
-
-The next step is to compile and flash a simple sketch that will flash the onboard LED on and off. Enter the following code into the IDE.
-
-```cpp
-void setup(void) {
- Serial.begin(9600);
- pinMode(2, OUTPUT);
-}
-
-void loop() {
- digitalWrite(2, HIGH);
- delay(1000);
- digitalWrite(2, LOW);
- delay(1000);
-}
-```
-
-Use the `Sketch > verify/compile` option to compile the code, there should not be any errors reported.
-
-Now you can flash the MCU with your cmpiled code using the `Sketch > Upload` menu option.
-
-As soon as the sketch has been flashed, open the _Tools > Serial monitor_ and change the baud rate to match that in the sketch (in this case it should be 9,600).
-
-### If Your Mac Crashes
-
-Many development boards including the NodeMCU v3 use the CH340 chipset for usb to serial communication. Unfortunately the official CH340 driver causes a _kernel panic_ (freeze and reboot) because the drivers are not signed correctly. The solution is to download and use a commercial driver from [Mac USB Serial](https://www.mac-usb-serial.com/) which costs $8. Before you buy this download and use the free test app to see if it recognises your NodeMCU. Unplug it, run the test app then plug in the NodeMCU, it should be recognised.
-
-## Connecting to the IO.Adafruit Server
-
-The next step is to publish some data to the [io.dafruit.com](https://io.adafruit.com) service. This is an MQTT broker which requires you to create an account before you can use it. Once you have an account you need to locate and copy your **username** and **AIO key** by clicking on the **View AIO Key** link .
-
-We will then need to install the correct library. Choose `Sketch > Include Library > Manage Library` and search for `adafruit MQTT` and click on the **install** button to install the latest version (0.20.1 at the time of writing).
-
-Once the library has been installed you can access a lot of sample sketches which will help you. A good starting point is the `File > Examples > Adafruit MQTT Library > mqtt_esp8266` sketch which shows you how to both publish to an MQTT topic as well as how to subscribe. Open this sketch and save it to a suitable location on your computer before making the following changes:
-
-1. Insert the **SSID** and **password** of your Wifi network where indicated.
-2. Insert your **username** and **AIO Key** where shown.
-
-You can now compile and flash the sketch to your NodeMCU board.
-
-## Viewing the Data
-
-Make sure you are logged onto the [io.dafruit.com](https://io.adafruit.com) website and locate the **Feeds** tab. This shows you all the topics you are publishing to. You should see a topic called **photocell** which contains an incrementing number. Clicking on the name shows you a graph with the raw data displayed underneath.
-
-Congratulations, you are publishing data to the server!
-
-## Publishing Real Data
-
-Connect a DHT11 sensor and publish the temperature data to the cloud server...
-
-Now its time to wire up a _real_ sensor. In addition to the NodeMCU you will need a solderless breadboard and a DHT11 sensor as well as some jumper wires to connect everything together.
-
-![DHT11 Breadboard Wiring](../../.images/DHT11_breadboard.png)
-
-Notice that although the sensor has 4 pins we only need 3 of them.
-
-1. VCC/+ (connects to the 3.3v power rail)
-2. DATA/OUT (connects to pin D4)
-3. NC (not connected)
-4. GND/- (connects to the ground rail)
-
-If your sensor is mounted on a breakout board it will only have 3 pins and these will be clearly labelled.
-
-DHT Sensor Library
-
-Now you need to install the `DHT sensor library by Adafruit`.
-
-using the code sample below (that sends the current temperature reading to the serial monitor) to publish the current temperature to the io.adafruit server?
-
-```cpp
-#include
-#include
-#include
-
-DHT_Unified dht(D4, DHT11);
-
-void setup() {
- Serial.begin(9600);
- dht.begin();
-}
-
-void loop() {
- delay(5000);
- sensors_event_t event;
- dht.temperature().getEvent(&event);
- if (!isnan(event.temperature)) {
- Serial.print("Temperature: ");
- Serial.print(event.temperature);
- Serial.println(" *C");
- }
-}
-```
-
-## Creating a Dashboard
-
-Now it's time to build something useful. Click on the **Dashboards** tab. Notice that you have one dashboard called the _Welcome Dashboard_, you need to delete this and create a new one called `Environment`.
-
-Open this and use the blue `+` button to create a new block. Choose the _Line Chart_ and on the next screen check the **Temperature** feed. Click the **Next Step** button, accept the default options and click **Done**. You will see the graph displayed on your dashboard.
-
-## Subscribing to a Topic
-
-So far you have been viewing data that has been published by the NodeMCU. In this section you will be publishing from the io.adafruit web page and your NodeMCU will subscribe to these messages!
-
-If you examine the sample code you will see that there is already code that subscribes to the `/feeds/onoff` topic. Make sure you are on your **Environment** dashboard and use the blue `+` to button to create a new block. This time choose a **Toggle** and, in the popup window enter `onoff` in the box labelled _Enter new feed name_ and click on the blue **Create** button.
-
-Make sure the Arduino _Serial Monitor_ is open and displaying the sensor values. Slide the on/off switch to the on position, what is displayed in the serial monitor? Slide it back to _off_, what is displayed? Can you find the code in the sketch that is being triggered?
-
-## Battery Power
-
-You have probably noticed that as soon as you disconnect the USB cable the NodeMCU stop running. This is solely because you have removed the power being supplied through the USB cable. It is useful to do this during development however rather inconvenient to have to permanently attach it to your computer. There are two ways you can power the NodeMCU after you disconnect from the computer:
-
-1. Plug the NodeMCU into a USB power bank.
-2. Use a breadboard power supply to provide 3.3v to the VIN pin.
-
-The best solution is to simply power the NodeMCU either using a microUSB power supply (wall wart) or using a phone power bank.
-
-### Using the Breadboard Power Supply
-
-Your IoT kit comes with a breadboard power supply that can supply either 3.3v or 5v to both power rails on the breadboard.
-
-**Make sure you set the two jumpers to supply 3.3v!**
-
-![DHT11 Breadboard Wiring](../../.images/DHT11_w_PSU.png)
-
-As you can see, the power is taken off the lower rail and supplied to the VIN pin, this powers the NodeMCU. This same rail also supplies the DHT11 sensor.
-
-Disconnect the USB cable and supply power to the power supply unit. This can be:
-
-1. A 9v battery (using the supplied battery clip).
-2. 4x AA batteries (using the battery box in the kit).
-3. A 'wall wart' mains power supply (between 5 and 9v).
-4. Usb power by connecting using the USB connector.
-
-You can power the system on and off using the white power button.
-
-### Reducing Power Drain
-
-At the moment your NodeMCU is drawing full power all the time. To conserve power (and allow you to run for longer on a battery) there are a number of steps you can take.
-
-The first is to reduce the sensor sample rate, taking a reading consumes power.
-
-The second approach is to put the NodeMCU into **deep sleep** until we need to take another sensor reading. To do this you need to connect the
-
-Pulling the **RESET** button _LOW_ resets the microcontroller (the equivalent of switching it off and on again). There is also a `RST` button next to the USB connector which does this for you. The ESP8266 microcontroller can be put into a deep sleep mode for a predetermined time (measured in microseconds). During this time only the Real-Time Clock (RTC) is running as this is needed to work out when to end the deep sleep. Once the time is up the `WAKE` pin is pulled low.
-
-On the ESP8266 `D0` is the `wake` pin and `rst` is the reset pin.
-
-What this means in practice is that we need to wire these pins together so that when the timer is done, the WAKE pin goes low and restarts the MCU. However this means we have to make a critical change to our code! Since the MCU is reset, the setup() function is run each time and so we need to move the code from loop() to setup(), see the example below:
-
-```cpp
-void setup() {
- Serial.begin(9600);
- Serial.setTimeout(2000);
- while(!Serial) {} // wait for the serial connection...
- Serial.println("I'm awake.");
- Serial.println("Going into deep sleep for 20 seconds");
- ESP.deepSleep(20e6);
-}
-
-void loop() {}
-```
-
-The parameter sent to `ESP.deepSleep()` is the number of microseconds to wait until pulling the `WAKE` pin low (restarting the MCU). `20e6` is scientific notation for 20 x 10 to the power of 6, 20,000,000 microseconds or 20 seconds.
-
-## Tracking Your Data
-
-Set up your remote sensor module somewhere safe and install the [DataFeeds app](https://itunes.apple.com/us/app/datafeeds-a-feed-monitor-for-adafruit-io/id1163614771?mt=8). By entering your AIO key you can monitor the data feeds on your smartphone!
-
-## References
-
-https://openhomeautomation.net/esp8266-battery
-
-https://www.losant.com/blog/making-the-esp8266-low-powered-with-deep-sleep
\ No newline at end of file
diff --git a/exercises/MQTT/arduino/samples/01 Lab 1 Arduino Introduction.md b/exercises/MQTT/arduino/samples/01 Lab 1 Arduino Introduction.md
deleted file mode 100644
index b40309c..0000000
--- a/exercises/MQTT/arduino/samples/01 Lab 1 Arduino Introduction.md
+++ /dev/null
@@ -1,61 +0,0 @@
-
-# Introduction to the Arduino PLatform
-
-In this lab you will be learning how to program the NodeMCU development board which is based on the ESP8266 module. You will find one of these development boards in your IoT kit, they look like this.
-
-![NodeMCU Comparison](../../.images/nodemcu.jpg)
-
-As you can see there are two versions, v2 and v3, make sure you know which version you are using.
-
-You should start by installing the latest version of the Visual Studio Code IDE (not Visual Studio). Open this and locate the Extensions tab from the left-hand edge.
-
-![Extensions Tab](../../.images/extensions.png)
-
-Search for and install the **PlatformIO IDE**. This will add an extra tab on the left-hand edge of the editor which can be used to launch the plugin.
-
-## Linux Setup
-
-Linux users have to install udev rules for PlatformIO supported boards/devices.
-
-```shell
-$ curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/develop/scripts/99-platformio-udev.rules | sudo tee /etc/udev/rules.d/99-platformio-udev.rules
-$ sudo service udev restart
-$ sudo usermod -a -G dialout $USER
-$ sudo usermod -a -G plugdev $USER
-```
-
-At this point you should unplug the board and reconnect.
-
-## Creating a new Project
-
-From the home screen choose **New Project**. Call it `hello` and locate the **NodeMCU 1.0** board (if you start typing in the box it searches the available boards).
-
-![Project Wizard](../../.images/project_wizard.png)
-
-This will create a project in your documents directory.
-
-Open this directory using Visual Studio Code and locate the `main.cpp` file in the `src/` directory. Modify the script to the following:
-
-```cpp
-#include
-
-void setup() {
- Serial.begin(9600);
- pinMode(2, OUTPUT);
-}
-
-void loop() {
- digitalWrite(2, HIGH);
- delay(1000);
- digitalWrite(2, LOW);
- delay(1000);
-}
-```
-
-## Uploading the Sketch
-
-There are a row of buttons in the editor's status bar. Hover over each of these in turn to show the tooltip to understand their purpose. Click on the **PlatformIO: Upload button to compile the sketch and upload to the attached board.
-
-![PlatformIO Buttons](../../.images/platformio_buttons.png)
-
-As soon as the sketch has uploaded it will start running. You should see the onboard LED flashing on and off.
diff --git a/exercises/MQTT/arduino/samples/01 SENSORS b/exercises/MQTT/arduino/samples/01 SENSORS
deleted file mode 100644
index e69de29..0000000
diff --git a/exercises/MQTT/arduino/samples/02 SENSORS b/exercises/MQTT/arduino/samples/02 SENSORS
deleted file mode 100644
index e69de29..0000000
diff --git a/exercises/MQTT/arduino/samples/03 SENSORS b/exercises/MQTT/arduino/samples/03 SENSORS
deleted file mode 100644
index e69de29..0000000
diff --git a/exercises/MQTT/arduino/samples/04 SENSORS I2C.md b/exercises/MQTT/arduino/samples/04 SENSORS I2C.md
deleted file mode 100644
index 349dcec..0000000
--- a/exercises/MQTT/arduino/samples/04 SENSORS I2C.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# The I2C Bus
-
-The I2C communication bus is used by many electronic devices. It allows communication between a master and multiple slave devices using only two wires. This works because each device has a unique device address so the master can choose with which devices will be communicating.
-
-Each I2C component has a default address which can be found on the [Master I2C Address List](https://learn.adafruit.com/i2c-addresses/the-list).
-
-The two wires, or lines are called Serial Clock (or SCL) and Serial Data (or SDA). The SCL line is the clock signal which synchronize the data transfer between the devices on the I2C bus and it’s generated by the master device. The other line is the SDA line which carries the data.
-
-Multiple devices can be daisychained using the same `SCL` and `SDA` pins. You can have a maximum of one controller and up to 127 devices sharing the same bus.
-
- Each MCU has the two pins pre-defined. On the NodeMCU v2 the SCL is pin `D1` and SDA is pin `D2`.
-
- ![SSD1306 Screen Connections](../../.images/ssd1306_screen.png)
-
-http://www.robot-electronics.co.uk/i2c-tutorial
-
-## Using the SSD1306 OLED Screen
-
-I2C communication on the Arduino platform uses the `Wire` library. You will need to install this plus the `Adafruit SSD1306` library which handles formatting the data to display as text on the screen.
-
-The SSD1306 uses address `0x3C`.
-
-```cpp
-
-#include
-#include
-#include
-
-#define OLED_RESET LED_BUILTIN
-Adafruit_SSD1306 display(OLED_RESET);
-
-void setup() {
- // 0x3C is the defaultI2C address for an SSD1306 display
- display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
-
- // Clear the buffer.
- display.clearDisplay();
- display.display();
-
- display.setTextSize(1);
- display.setTextColor(WHITE);
- display.setCursor(0,0);
- display.println("Hello from:");
- display.setTextSize(2);
- display.setCursor(10, 20);
- display.println("Coventry");
- display.println("University");
- display.display();
-
-}
-
-void loop() {}
-```
-
-http://arduino-er.blogspot.co.uk/2016/04/nodemcu-esp8266-to-display-on-128x64.html
-
-## Commecting the VEML6070 UV Sensor
-
-Install the `Adafruit VEML6070` library.
-
-
diff --git a/exercises/MQTT/arduino/samples/05 SENSORS b/exercises/MQTT/arduino/samples/05 SENSORS
deleted file mode 100644
index e69de29..0000000
diff --git a/exercises/MQTT/arduino/samples/06 SENSORS b/exercises/MQTT/arduino/samples/06 SENSORS
deleted file mode 100644
index e69de29..0000000
diff --git a/exercises/MQTT/arduino/samples/07 Interrupts.md b/exercises/MQTT/arduino/samples/07 Interrupts.md
deleted file mode 100644
index 89c4319..0000000
--- a/exercises/MQTT/arduino/samples/07 Interrupts.md
+++ /dev/null
@@ -1,103 +0,0 @@
-
-# Interrupts
-
-interrupts are events or conditions that cause the microprocessor or microcontroller to stop the execution of the task that it is performing, work in a different task temporarily and come back to the initial task. This means the microcontroller can respond to signals without the need for _polling_. In traditional programming terms interrupts server the same purpose as _event handlers_.
-
-When an interrupt is triggered we handle it in an Interrupt Service Routine (ISR).
-
-When working with arduino there are two types of interupt:
-
-1. External Interrupts are triggered on the logic state changing on an external pin. These are good when you are waiting for an external signal to run a block of code.
-2. Timer Interupts are triggered at a predetermined interval based on the MCU clock signal. These are good when you want to trigger a block of code at specific intervals.
-
-## 1 External Interrupts
-
-The ESP8266 microcontroller has a number of General Purpose Input/Output (GPIO) pins. As you can see from the pinout diagram below these don't match the pin labels on the breakout board.
-
-![NodeMCU Pinout](../../.images/nodemcu_pins.png)
-
-In our example we define `GPIO13` as our interrup which corresponds to the `D7` pin on the breakout board and use the [attachInterrupt() function](https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/) to attach the interupt to the specified pin. This takes 3 parameters:
-
-1. The GPIO pin to attach the interupt to.
-2. The Interupt Service Routine (ISR) to attach.
-3. The _mode_, defining when the interrupt should be triggered (LOW, CHANGE, RISING, FALLING).
-
-Here is a simple example that attaches an interrupt to pin `D7` corresponding to GPIO13 and outputs to the serial monitor:
-
-```cpp
-const byte interruptPin = 13;
-volatile byte interruptCounter = 0;
-int numberOfInterrupts = 0;
-
-void setup() {
- Serial.begin(9600);
- pinMode(interruptPin, INPUT_PULLUP);
- attachInterrupt(digitalPinToInterrupt(interruptPin), handleInterrupt, FALLING);
-}
-
-void handleInterrupt() {
- interruptCounter++;
-}
-
-void loop() {
- if(interruptCounter > 0){
- interruptCounter--;
- numberOfInterrupts++;
- Serial.print("An interrupt has occurred. Total: ");
- Serial.println(numberOfInterrupts);
- }
-}
-```
-
-You can test this by using a wire to connect the `G` (ground) pin to `D7`. Each time you do this it triggers the interrupt and you should see this output to the serial monitor.
-
-### Debouncing
-
-If you try out this example you will see that each time you connect `G` to `D7`, you get multiple interrupts. This is because as you manually touch the pin it _bounces_, creating multiple signals. To resolve this you would need to implement either a debounce circuit that removes these in the switch or do it in software.
-
-### 1.1 Test Your Understanding
-
-Your kit contains a simple Anemometer to measure wind speed. It is supplied with a cable that terminates at an RJ11 connector. If you examine this connector you will see that only the middle 2 pins are in use. The anemometer contains two microswitches that close as the top rotates, each rotation triggers both switches. You will also find an RJ11 Breakout Board which will allow you to connect it to the breadboard.
-
-1. Interface this to your ESP8266 using the `G` (ground) pin and `D7` (GPIO13) pins.
-2. Modify the code above to record how many rotations the anemometer makes.
-
-## 2 Timer Interupts
-
-A timer interrupt triggers an ISR at a predetermined time interval. Whilst it is possible to write code to interact directly with `Timer0` it is much easier to use the `Ticker` library.
-
-```cpp
-#include
-#define LED 2
-Ticker blinker;
-
-void setup() {
- Serial.begin(9600);
- Serial.println("");
- pinMode(LED,OUTPUT);
- blinker.attach(2, changeState);
-}
-
-void changeState() {
- //Invert Current State of LED
- digitalWrite(LED, !(digitalRead(LED)));
-}
-
-void loop() {}
-```
-
-### 2.2 Test Your Understanding
-
-1. Modify the code from the previous step to reset the counter every 5 seconds.
-2. Just before you reset the counter, store the current value in a variable.
-3. Use the handheld digital anemometer to calibrate your system in MPH.
-
-## Fritzing Files
-
-[ESP8266 Development Board](https://github.com/squix78/esp8266-fritzing-parts/blob/master/nodemcu-v1.0/NodeMCUV1.0.fzpz).
-
-## References
-
-Interrupt example with thanks to [Tech Tutorials X](https://techtutorialsx.com/2016/12/11/esp8266-external-interrupts/)
-
-Ticker example with thanks to [Circuits For You](https://circuits4you.com/2018/01/02/esp8266-timer-ticker-example/)
diff --git a/exercises/MQTT/arduino/samples/08 Networking.md b/exercises/MQTT/arduino/samples/08 Networking.md
deleted file mode 100644
index 1b5e218..0000000
--- a/exercises/MQTT/arduino/samples/08 Networking.md
+++ /dev/null
@@ -1,85 +0,0 @@
-
-# Networking
-
-In this worksheet we will expore how to connect to the internet and how to publish data to an MQTT broker.
-
-You will need to install additional libraries (Sketch > Include Library > Manage Libraries).
-
-Search for the the **pubsubclient** library and install the latest version.
-
-The following code will allow you NodeMCU (ESP8266) to connect to a network. Make sure you enter the ssid for your access point along with the correct password. This script will connect the microcontroller to your chosen access point and print the IP address to the _Serial Monitor_.
-
-```cpp
-#include "ESP8266WiFi.h"
-
-const char* ssid = "XXX";
-const char* password = "XXX";
-
-void setup() {
- Serial.begin(9600);
- WiFi.begin(ssid, password);
- while (WiFi.status() != WL_CONNECTED) {
- delay(500);
- Serial.print(".");
- }
- Serial.println("");
- Serial.println("WiFi connected");
- Serial.println(WiFi.localIP());
-}
-
-void loop() {
-
-}
-```
-
-## Using the University Network
-
-This script won't be able to connect you to a network requiring a username and password (such as your University network). In this situation you will need to connect to a special network that has been set up for IoT projects. Typically this will have its access restricted to the standard MQTT ports (1883 for MQTT traffic and 8883 for using MQTT over SSL).
-
-At Coventry University you should connect use the ssid `ECL-LEGO-ROBOTS` with the password `9cjjp64270`.
-
-## Using Smartphone Tethering
-
-If you are not in range of a suitable wifi network you should be able to use your phone's data connection. Since the amount of data being transmittedis very small this should not have much impact on your data usage.
-
-## Using the Network Time Protocol (NTP)
-
-NTP is a networking protocol to synchronise clocks over a network that has varying latency (such as the Internet). It is designed to synchronise the computers to within a few milliseconds of UTC. It uses UDP rather than TCP as its protocol. It works over port 123.
-
-This is a very useful protocol as it allows you to timestamp your data without needing to use a Real Time Clock (RTC). It can also be used to correctly initialise an RTC when the microcontroller is first started.
-
-```cpp
-#include
-#include
-#include
-
-const char *ssid = "ECL-LEGO-ROBOTS";
-const char *password = "9cjjp64270";
-
-WiFiUDP ntpUDP;
-NTPClient timeClient(ntpUDP);
-
-void setup(){
- Serial.begin(9600);
-
- WiFi.begin(ssid, password);
-
- while ( WiFi.status() != WL_CONNECTED ) {
- delay ( 500 );
- Serial.print ( "." );
- }
-
- timeClient.begin();
-}
-
-void loop() {
- timeClient.update();
-
- Serial.println(timeClient.getFormattedTime());
- Serial.println(timeClient.getEpochTime());
-
- delay(1000);
-}
-```
-
-// https://github.com/arduino-libraries/NTPClient/blob/master/NTPClient.h
diff --git a/exercises/MQTT/arduino/samples/09 Publishing Data.md b/exercises/MQTT/arduino/samples/09 Publishing Data.md
deleted file mode 100644
index e69de29..0000000
diff --git a/exercises/MQTT/arduino/samples/gallery.md b/exercises/MQTT/arduino/samples/gallery.md
deleted file mode 100644
index 582a8c5..0000000
--- a/exercises/MQTT/arduino/samples/gallery.md
+++ /dev/null
@@ -1,33 +0,0 @@
-
-# Component Gallery
-
-Use the following to help identify your components:
-
-| Component | Code | Picture |
-| ---------- | -------- | --------------------------------------------------- |
-| NODEMCU v2 | ESP8266 | ![ADXL335](../../.images/components/NODEMCU-V2.jpg) |
-| NODEMCU v3 | ESP8266 | ![ADXL335](../../.images/components/NODEMCU-V3.jpg) |
-| ESP32 OLED | ESP32 | ![ADXL335](../../.images/components/esp32oled.png) |
-
-## Sensors and Actuators
-
-| Component | Code | Bus | Picture |
-| ------------------ | -------- | ------ | --------------------------------------------------- |
-| Tilt | ADXL335 | ANALOG | ![ADXL335](../../.images/components/ADXL335.jpg) |
-| Sound | - | ANALOG | ![ADXL335](../../.images/components/SOUND.jpg) |
-| CO2 Gas Sensor | MQ-135 | ANALOG | ![ADXL335](../../.images/components/MQ-135.jpg) |
-| Temp/Humidity | DHT11 | SERIAL | ![ADXL335](../../.images/components/DHT11.jpg) |
-| GPS | NEO-6M | SERIAL | ![ADXL335](../../.images/components/NEO-6M.jpg) |
-| Nokia 5110 Screen | PCD8544 | SERIAL | ![ADXL335](../../.images/components/NOKIA-5110.jpg) |
-| Air Pressure | BMP10 | I2C | ![ADXL335](../../.images/components/BMP10.jpg) |
-| Compass | HMC5883L | I2C | ![ADXL335](../../.images/components/HMC5883L.jpg) |
-| OLED Screen | SSD1306 | I2C | ![ADXL335](../../.images/components/LANMU.jpg) |
-| Light | TSL2561 | I2C | ![ADXL335](../../.images/components/TSL2561.jpg) |
-| UV | VEML6070 | I2C | ![ADXL335](../../.images/components/VEML6070.jpg) |
-| Temp (water) | DS18B20 | 1-Wire | ![ADXL335](../../.images/components/DS18B20.jpg) |
-| Analog Multiplexer | MCP3008 | SPI | ![ADXL335](../../.images/components/MCP3008.jpg) |
-| 3 Axis Gyro/Accel | MPU5060 | SPI | ![MPU5060](../../.images/components/MPU5060.png) |
-| 9-axis high pressure attitude | MPU9151 | SPI | ![MPU9151](../../.images/components/MPU9151.png) |
-| GPS | NEO-7M | SERIAL | ![NEO-7M](../../.images/components/NEO-7M.png) |
-| Servo Driver Board | xxx | I2C | ![NEO-7M](../../.images/components/servo-driver.png) |
-| Servo | SG90 | PWM | ![NEO-7M](../../.images/components/servo.png) |
diff --git a/exercises/MQTT/arduino/samples/sample_sketches/DHT11.ino b/exercises/MQTT/arduino/samples/sample_sketches/DHT11.ino
deleted file mode 100644
index 983ae05..0000000
--- a/exercises/MQTT/arduino/samples/sample_sketches/DHT11.ino
+++ /dev/null
@@ -1,23 +0,0 @@
-
-#include
-#include
-#include
-
-DHT_Unified dht(D4, DHT11);
-
-void setup() {
- Serial.begin(9600);
- dht.begin();
-}
-
-void loop() {
- delay(5000);
- sensors_event_t event;
- dht.temperature().getEvent(&event);
- if (!isnan(event.temperature)) {
- Serial.print("Temperature: ");
- Serial.print(event.temperature);
- Serial.println(" *C");
- }
-}
-
diff --git a/exercises/MQTT/arduino/samples/sample_sketches/TLS2561.ino b/exercises/MQTT/arduino/samples/sample_sketches/TLS2561.ino
deleted file mode 100644
index 0d03a9b..0000000
--- a/exercises/MQTT/arduino/samples/sample_sketches/TLS2561.ino
+++ /dev/null
@@ -1,73 +0,0 @@
-#include
-#include
-
-SFE_TSL2561 light;
-
-boolean gain;
-unsigned int ms;
-
-void setup() {
- Serial.begin(9600);
- Serial.println("TSL2561 example sketch");
- light.begin();
- unsigned char ID;
- if (light.getID(ID)) {
- Serial.print("Got factory ID: 0X");
- Serial.print(ID,HEX);
- Serial.println(", should be 0X5X");
- } else {
- byte error = light.getError();
- printError(error);
- }
- gain = 0;
- unsigned char time = 2;
- Serial.println("Set timing...");
- light.setTiming(gain,time,ms);
- Serial.println("Powerup...");
- light.setPowerUp();
-}
-
-void loop() {
- delay(ms);
- unsigned int data0, data1;
- if ( light.getData(data0,data1) ) {
- Serial.print("data0: ");
- Serial.print(data0);
- Serial.print(" data1: ");
- Serial.print(data1);
- double lux;
- boolean good;
- good = light.getLux(gain,ms,data0,data1,lux);
- Serial.print(" lux: ");
- Serial.print(lux);
- if (good) Serial.println(" (good)"); else Serial.println(" (BAD)");
- } else {
- byte error = light.getError();
- printError(error);
- }
-}
-
-void printError(byte error) {
- Serial.print("I2C error: ");
- Serial.print(error,DEC);
- Serial.print(", ");
- switch(error) {
- case 0:
- Serial.println("success");
- break;
- case 1:
- Serial.println("data too long for transmit buffer");
- break;
- case 2:
- Serial.println("received NACK on address (disconnected?)");
- break;
- case 3:
- Serial.println("received NACK on data");
- break;
- case 4:
- Serial.println("other error");
- break;
- default:
- Serial.println("unknown error");
- }
-}
diff --git a/exercises/MQTT/arduino/samples/sample_sketches/adafruit_dht11.ino b/exercises/MQTT/arduino/samples/sample_sketches/adafruit_dht11.ino
deleted file mode 100644
index a553971..0000000
--- a/exercises/MQTT/arduino/samples/sample_sketches/adafruit_dht11.ino
+++ /dev/null
@@ -1,80 +0,0 @@
-
-#include
-#include "Adafruit_MQTT.h"
-#include "Adafruit_MQTT_Client.h"
-
-#include
-#include
-#include
-
-DHT_Unified dht(D4, DHT11);
-
-#define WLAN_SSID "ECL-LEGO-ROBOTS"
-#define WLAN_PASS "9cjjp64270"
-#define AIO_SERVER "io.adafruit.com"
-#define AIO_SERVERPORT 1883
-#define AIO_USERNAME "xxxxxxxxx"
-#define AIO_KEY "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-
-WiFiClient client;
-Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);
-Adafruit_MQTT_Publish temperature = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/temperature");
-
-uint32_t temp=0;
-
-void setup(void) {
- Serial.begin(9600);
- dht.begin();
- pinMode(2, OUTPUT);
- WiFi.begin(WLAN_SSID, WLAN_PASS);
- while (WiFi.status() != WL_CONNECTED) {
- delay(500);
- Serial.print(".");
- }
- Serial.println();
-
- Serial.println("WiFi connected");
- Serial.println("IP address: "); Serial.println(WiFi.localIP());
-}
-
-void loop() {
- delay(5000);
- sensors_event_t event;
- dht.temperature().getEvent(&event);
- if (isnan(event.temperature)) {
- Serial.println("Error reading temperature!");
- } else {
- Serial.print("Temperature: ");
- Serial.print(event.temperature);
- Serial.println(" *C");
- MQTT_connect();
- if (!temperature.publish(event.temperature)) {
- Serial.println("Failed");
- }
- }
-}
-
-void MQTT_connect() {
- int8_t ret;
-
- // Stop if already connected.
- if (mqtt.connected()) {
- return;
- }
-
- Serial.print("Connecting to MQTT... ");
-
- uint8_t retries = 3;
- while ((ret = mqtt.connect()) != 0) { // connect will return 0 for connected
- Serial.println(mqtt.connectErrorString(ret));
- Serial.println("Retrying MQTT connection in 5 seconds...");
- mqtt.disconnect();
- delay(5000); // wait 5 seconds
- retries--;
- if (retries == 0) {
- // basically die and wait for WDT to reset me
- while (1);
- }
- }
- Serial.println("MQTT Connected!");
-}
diff --git a/exercises/MQTT/arduino/samples/sample_sketches/dht11_deepsleep.ino b/exercises/MQTT/arduino/samples/sample_sketches/dht11_deepsleep.ino
deleted file mode 100644
index 41c732e..0000000
--- a/exercises/MQTT/arduino/samples/sample_sketches/dht11_deepsleep.ino
+++ /dev/null
@@ -1,84 +0,0 @@
-
-#include
-#include "Adafruit_MQTT.h"
-#include "Adafruit_MQTT_Client.h"
-
-#include
-#include
-#include
-
-DHT_Unified dht(D4, DHT11);
-
-#define WLAN_SSID "ECL-LEGO-ROBOTS"
-#define WLAN_PASS "9cjjp64270"
-#define AIO_SERVER "io.adafruit.com"
-#define AIO_SERVERPORT 1883
-#define AIO_USERNAME "xxxxxxxx"
-#define AIO_KEY "xxxxxxxx"
-
-WiFiClient client;
-Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);
-Adafruit_MQTT_Publish temperature = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/temperature");
-Adafruit_MQTT_Publish humidity = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/humidity");
-
-uint32_t temp=0;
-const int sleepMin = 10;
-
-void setup(void) {
- Serial.begin(9600);
- dht.begin();
- pinMode(2, OUTPUT);
- WiFi.begin(WLAN_SSID, WLAN_PASS);
- while (WiFi.status() != WL_CONNECTED) {
- delay(500);
- Serial.print(".");
- }
- Serial.println("IP address: "); Serial.println(WiFi.localIP());
- delay(5000);
- sensors_event_t event;
- dht.temperature().getEvent(&event);
- if (isnan(event.temperature)) {
- Serial.println("Error reading temperature!");
- } else {
- Serial.print("Temperature: ");
- Serial.print(event.temperature);
- Serial.println(" *C");
- MQTT_connect();
- if (!temperature.publish(event.temperature)) {
- Serial.println("Failed to publish temperature");
- }
- }
- delay(5000);
- Serial.println("ESP8266 going into deep sleep mode");
- ESP.deepSleep(560e6); // 56e6 is 56 seconds
-}
-
-void loop() {
-
-}
-
-void MQTT_connect() {
- int8_t ret;
-
- // Stop if already connected.
- if (mqtt.connected()) {
- return;
- }
-
- Serial.print("Connecting to MQTT... ");
-
- uint8_t retries = 3;
- while ((ret = mqtt.connect()) != 0) { // connect will return 0 for connected
- Serial.println(mqtt.connectErrorString(ret));
- Serial.println("Retrying MQTT connection in 5 seconds...");
- mqtt.disconnect();
- delay(5000); // wait 5 seconds
- retries--;
- if (retries == 0) {
- // basically die and wait for WDT to reset me
- while (1);
- }
- }
- Serial.println("MQTT Connected!");
-}
-
diff --git a/exercises/MQTT/arduino/samples/sample_sketches/sd_card.ino b/exercises/MQTT/arduino/samples/sample_sketches/sd_card.ino
deleted file mode 100644
index f65e604..0000000
--- a/exercises/MQTT/arduino/samples/sample_sketches/sd_card.ino
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- SD card read/write
-
- This example shows how to read and write data to and from an SD card file
- The circuit:
- * SD card attached to SPI bus as follows:
- ** MOSI - D7
- ** MISO - D6
- ** CLK - D5
- ** CS - D8
-
- created Nov 2010
- by David A. Mellis
- modified 9 Apr 2012
- by Tom Igoe
- modified 26 Apr 2018
- by David Croft
-
- This example code is in the public domain.
-
- */
-
-#include
-#include
-
-File myFile;
-
-void setup() {
- // Open serial communications and wait for port to open:
- Serial.begin(9600);
- while (!Serial) {
- ; // wait for serial port to connect. Needed for native USB port only
- }
-
-
- Serial.print("Initializing SD card...");
-
- if (!SD.begin(D8)) {
- Serial.println("initialization failed!");
- while (1);
- }
- Serial.println("initialization done.");
-
- // open the file. note that only one file can be open at a time,
- // so you have to close this one before opening another.
- myFile = SD.open("test.txt", FILE_WRITE);
-
- // if the file opened okay, write to it:
- if (myFile) {
- Serial.print("Writing to test.txt...");
- myFile.println("testing 1, 2, 3, 42.");
- // close the file:
- myFile.close();
- Serial.println("done.");
- } else {
- // if the file didn't open, print an error:
- Serial.println("error opening test.txt");
- }
-
- // re-open the file for reading:
- myFile = SD.open("test.txt");
- if (myFile) {
- Serial.println("test.txt:");
-
- // read from the file until there's nothing else in it:
- while (myFile.available()) {
- Serial.write(myFile.read());
- }
- // close the file:
- myFile.close();
- } else {
- // if the file didn't open, print an error:
- Serial.println("error opening test.txt");
- }
-}
-
-void loop() {
- // nothing happens after setup
-}
diff --git a/exercises/MQTT/arduino/screen/include/readme.txt b/exercises/MQTT/arduino/screen/include/readme.txt
deleted file mode 100644
index 194dcd4..0000000
--- a/exercises/MQTT/arduino/screen/include/readme.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-
-This directory is intended for project header files.
-
-A header file is a file containing C declarations and macro definitions
-to be shared between several project source files. You request the use of a
-header file in your project source file (C, C++, etc) located in `src` folder
-by including it, with the C preprocessing directive `#include'.
-
-```src/main.c
-
-#include "header.h"
-
-int main (void)
-{
- ...
-}
-```
-
-Including a header file produces the same results as copying the header file
-into each source file that needs it. Such copying would be time-consuming
-and error-prone. With a header file, the related declarations appear
-in only one place. If they need to be changed, they can be changed in one
-place, and programs that include the header file will automatically use the
-new version when next recompiled. The header file eliminates the labor of
-finding and changing all the copies as well as the risk that a failure to
-find one copy will result in inconsistencies within a program.
-
-In C, the usual convention is to give header files names that end with `.h'.
-It is most portable to use only letters, digits, dashes, and underscores in
-header file names, and at most one dot.
-
-Read more about using header files in official GCC documentation:
-
-* Include Syntax
-* Include Operation
-* Once-Only Headers
-* Computed Includes
-
-https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html
diff --git a/exercises/MQTT/arduino/screen/lib/readme.txt b/exercises/MQTT/arduino/screen/lib/readme.txt
deleted file mode 100644
index cfa16df..0000000
--- a/exercises/MQTT/arduino/screen/lib/readme.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-
-This directory is intended for project specific (private) libraries.
-PlatformIO will compile them to static libraries and link them to executable files.
-
-The source code of each library should be placed in separate directories, like
-"lib/private_lib/[here are source files]".
-
-For example, see the structure of the following two libraries `Foo` and `Bar`:
-
-|--lib
-| |
-| |--Bar
-| | |--docs
-| | |--examples
-| | |--src
-| | |- Bar.c
-| | |- Bar.h
-| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
-| |
-| |--Foo
-| | |- Foo.c
-| | |- Foo.h
-| |
-| |- readme.txt --> THIS FILE
-|
-|- platformio.ini
-|--src
- |- main.c
-
-Then in `src/main.c` you should use:
-
-#include
-#include
-
-// rest H/C/CPP code
-
-PlatformIO will find your libraries automatically, configure preprocessor's
-include paths and build them.
-
-More information about PlatformIO Library Dependency Finder
-- https://docs.platformio.org/page/librarymanager/ldf.html
diff --git a/exercises/MQTT/arduino/screen/platformio.ini b/exercises/MQTT/arduino/screen/platformio.ini
deleted file mode 100644
index ef7048d..0000000
--- a/exercises/MQTT/arduino/screen/platformio.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-; PlatformIO Project Configuration File
-;
-; Build options: build flags, source filter
-; Upload options: custom upload port, speed and extra flags
-; Library options: dependencies, extra library storages
-; Advanced options: extra scripting
-;
-; Please visit documentation for the other options and examples
-; https://docs.platformio.org/page/projectconf.html
-
-[env:lolin32]
-platform = espressif32
-board = lolin32
-framework = arduino
-; upload_port = /dev/ttyUSB0
-upload_speed = 9600 ; 9600 14400 19200 28800 38400 57600 115200
-upload_protocol = esptool
-
-lib_deps =
- ESP8266_SSD1306
diff --git a/exercises/MQTT/arduino/screen/src/main.cpp b/exercises/MQTT/arduino/screen/src/main.cpp
deleted file mode 100644
index f437a30..0000000
--- a/exercises/MQTT/arduino/screen/src/main.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#include
-#include "SSD1306.h"
-
-SSD1306 display(0x3c, 5, 4); // I2C: pin 5 is data, 4 is clock
-
-int sensorValue = 0;
-
-void setup() {
- display.init();
-
- display.flipScreenVertically();
- display.setFont(ArialMT_Plain_10);
- display.setTextAlignment(TEXT_ALIGN_LEFT);
-}
-
-void loop() {
- sensorValue = analogRead(2); // GPIO pin 2 (change to D4 for ESP8266)
- Serial.println(sensorValue);
- display.clear();
- display.drawString(0, 0, "Hello world: " + String(millis()));
- display.display();
- delay(10);
-}
diff --git a/exercises/MQTT/nodejs/index.js b/exercises/MQTT/nodejs/index.js
deleted file mode 100755
index d61e082..0000000
--- a/exercises/MQTT/nodejs/index.js
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env node
-
-'use strict'
-
-const fs = require('fs')
-const mqtt = require('mqtt')
-
-const CAfile = [fs.readFileSync('mqtt.crt')]
-
-const options = {
- host: 'mqtt.coventry.ac.uk',
- port: 8883,
- protocol: 'mqtts',
- protocolId: 'MQIsdp',
- ca: CAfile,
- username: 'xxx',
- password: 'xxx',
- secureProtocol: 'TLSv1_method',
- protocolVersion: 3
-}
-
-const client = mqtt.connect(options)
-
-client.on('connect', () => {
- console.log('connected')
- client.subscribe('xxx/hello')
-})
-
-// receives MQTT message (subscribe)
-client.on('message', (topic, message) => console.log(`received topic: ${topic}, message: ${message}`))
-
-client.publish('xxx/hello', 'Hello World!')
diff --git a/exercises/MQTT/nodejs/mqtt.crt b/exercises/MQTT/nodejs/mqtt.crt
deleted file mode 100644
index d30f409..0000000
--- a/exercises/MQTT/nodejs/mqtt.crt
+++ /dev/null
@@ -1,31 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL
-BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc
-BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00
-MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
-aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIgRzMwggIiMA0GCSqG
-SIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFhZiFf
-qq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMW
-n4rjyduYNM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ym
-c5GQYaYDFCDy54ejiK2toIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+
-O7q414AB+6XrW7PFXmAqMaCvN+ggOp+oMiwMzAkd056OXbxMmO7FGmh77FOm6RQ1
-o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+lV0POKa2Mq1W/xPtbAd0j
-IaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZoL1NesNKq
-IcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz
-8eQQsSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43eh
-vNURG3YBZwjgQQvD6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l
-7ZizlWNof/k19N+IxWA1ksB8aRxhlRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALG
-cC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB
-BjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZIhvcNAQELBQAD
-ggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66
-AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RC
-roijQ1h5fq7KpVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0Ga
-W/ZZGYjeVYg3UQt4XAoeo0L9x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4n
-lv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgzdWqTHBLmYF5vHX/JHyPLhGGfHoJE
-+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6XU/IyAgkwo1jwDQHV
-csaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+NwmNtd
-dbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNg
-KCLjsZWDzYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeM
-HVOyToV7BjjHLPj4sHKNJeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4
-WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M
------END CERTIFICATE-----
diff --git a/exercises/MQTT/nodejs/package.json b/exercises/MQTT/nodejs/package.json
deleted file mode 100644
index 5d5ba6c..0000000
--- a/exercises/MQTT/nodejs/package.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "scanner",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "",
- "license": "ISC",
- "dependencies": {
- "mqtt": "^2.18.8",
- "noble": "^1.9.1",
- "node-beacon-scanner": "^0.1.1"
- }
-}
diff --git a/exercises/MQTT/python/coventry_pub.py b/exercises/MQTT/python/coventry_pub.py
deleted file mode 100644
index 80630ea..0000000
--- a/exercises/MQTT/python/coventry_pub.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-
-import paho.mqtt.client as mqtt #import the client
-import time
-def on_connect(client, userdata, flags, rc):
- if rc==0:
- client.connected_flag=True #set flag
- print("connected OK")
- else:
- print("Bad connection Returned code=",rc)
-mqtt.Client.connected_flag=False #create flag in class
-broker="mqtt.coventry.ac.uk"
-client = mqtt.Client("python")
-client.username_pw_set("302CEM", "xxx")
-client.tls_set("./mqtt.crt")
-client.on_connect=on_connect
-client.loop_start()
-print("Connecting to broker ",broker)
-client.connect(broker, 8883)
-while not client.connected_flag: #wait in loop
- print("In wait loop")
- time.sleep(1)
-print("in Main Loop")
-client.publish("powerx/hello", "Hello World", qos=0, retain=False)
-client.loop_stop() # Stop loop
-client.disconnect() # disconnect
diff --git a/exercises/MQTT/python/publish_sockets.py b/exercises/MQTT/python/publish_sockets.py
deleted file mode 100644
index d8d5b1b..0000000
--- a/exercises/MQTT/python/publish_sockets.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#Note demo scripts have limited or no error detection and use
-#timers to wait for events. They assume everything works ok
-#www.steves-internet-guide.com
-#contact steve@steves-internet-guide.com
-#uses websockets publish-subscribe and receive message
-import paho.mqtt.client as paho
-import time
-broker="broker.mqttdashboard.com"
-broker="iot.eclipse.org"
-broker="192.168.1.206"
-#port= 80
-#port=1883
-port= 9001
-sub_topic="house/#"
-def on_subscribe(client, userdata, mid, granted_qos): #create function for callback
- print("subscribed with qos",granted_qos, "\n")
- pass
-def on_message(client, userdata, message):
- print("message received " ,str(message.payload.decode("utf-8")))
-def on_publish(client,userdata,mid): #create function for callback
- print("data published mid=",mid, "\n")
- pass
-def on_disconnect(client, userdata, rc):
- print("client disconnected ok")
-client= paho.Client("client-socks",transport='websockets') #create client object
-#client= paho.Client("control1")
-client.on_subscribe = on_subscribe #assign function to callback
-client.on_publish = on_publish #assign function to callback
-client.on_message = on_message #assign function to callback
-client.on_disconnect = on_disconnect
-print("connecting to broker ",broker,"on port ",port)
-client.connect(broker,port) #establish connection
-client.loop_start()
-print("subscribing to ",sub_topic)
-client.subscribe(sub_topic)
-time.sleep(3)
-client.publish("house/bulb1","on") #publish
-time.sleep(4)
-
-client.disconnect()
diff --git a/exercises/MQTT/raspberry_pi/install.sh b/exercises/MQTT/raspberry_pi/install.sh
deleted file mode 100644
index 52b7a8b..0000000
--- a/exercises/MQTT/raspberry_pi/install.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-apt update
-apt list --upgradable
-# apt-get dist-upgrade DON'T RUN THIS!!!
-apt upgrade -y
-apt install -y apt-utils raspi-config
-
-# apt upgrade is still prompting to continue
-# apt update && apt-get dist-upgrade && apt upgrade -y && apt install -y apt-utils raspi-config
-
-## remember to enable ssh!!!!
-
-raspi-config nonint do_expand_rootfs
-partprobe
-# raspi-config nonint do_ssh 0
-# sudo raspi-config nonint do_i2c 0
-apt install -y apt-transport-https rsync sudo nano git tree curl mc libssl-dev libffi-dev i2c-tools
-raspi-config nonint do_hostname elephant
-useradd -m -d /home/userx -s /bin/bash -c "userx account" userx
-usermod -aG sudo userx
-echo 'userx:mysecurepw'|chpasswd
-echo 'root:mysecurepw'|chpasswd
-
-echo "KERNEL==\"i2c-0\" , GROUP=\"i2c\", MODE=\"0660\\n"
-KERNEL==\"i2c-[1-9]*\", GROUP=\"i2c\", MODE=\"0666\"" > 'nano /lib/udev/rules.d/60-i2c-tools.rules'
\ No newline at end of file
diff --git a/exercises/MQTT/web_client/chat/index.html b/exercises/MQTT/web_client/chat/index.html
deleted file mode 100644
index 89fc05f..0000000
--- a/exercises/MQTT/web_client/chat/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
- Simple MQTT Client
-
-
-
-
-
-
-
-
Simple MQTT Client
-
-
-
-
diff --git a/exercises/MQTT/web_client/chat/module.js b/exercises/MQTT/web_client/chat/module.js
deleted file mode 100644
index 947f4c7..0000000
--- a/exercises/MQTT/web_client/chat/module.js
+++ /dev/null
@@ -1,33 +0,0 @@
-
-'use strict'
-
-/* eslint no-unused-vars: 0 */
-
-const messages = ( function() {
- let msgs = []
- return {
- extractData: payloadString => {
- return payloadString
- },
- add: data => {
- if(data === '') throw new Error('empty string parameter')
- msgs[0] = data
- },
- get html() {
- let html = ''
- for(const msg of msgs) {
- html += `