Skip to content

fhnw-iot-4ia/fhnw-iot-work-03-okaerin

Repository files navigation

IoT Engineering

Hands-on of lesson 3

For slides and example code, see lesson 3

Note: Do not work on this repository right away.
Create your personal copy by clicking this GitHub Classroom link.

a) ESP8266 Wi-Fi, 15'

  • Build and run the previous Wi-Fi related examples.
  • Use the .ino link on each page to find the source.
  • The examples are in the course repository.
  • Make sure to use the ESP8266 board

b) ESP8266 NTP clients, 15'

c) ESP8266 TLS clients, 15'

  • Build, run and compare the following TLS clients:
  • Secure Wi-Fi client, with fingerprint, with CA check.
  • Locate/download the CA certificate in your browser.
  • Locate the SHA-1 fingerprint of the host certificate.
  • Bonus: Try to change the host to another Website.

d) Dweet.io, 15'

  • Dweet.io works without an account, data is public.
  • Use your ESP8266 MAC address as THING_NAME.
  • On the ESP8266, read the analog pin A0, then POST
    its value to /dweet/for/THING_NAME?a0=value
  • Use cURL or your browser to read stored data from
    https://dweet.io/get/dweets/for/THING_NAME

e) ThingSpeak, 15'

  • Get an account to create channels and get API keys.
  • Add the Arduino library with Sketch > Include
  • Library > Manage Libraries... > ThingSpeak > Install
  • Try the example code File > Examples > ThingSpeak > ESP8266 > WriteMultipleFields.ino
  • Make sure values arrive in your ThingSpeak channel.

f) Temperature sensor, 15'

  • Design a connected temperature sensor as specified:
  • Gets current time and date in ISO 8601 UTC format.
  • Gets temperature & humidity from a DHT11 sensor.
  • Connects to api.thingspeak.com port 443 with TLS.
    (
    And robustly reconnects, if disconnected.)
  • Posts sensor values, timestamp every 30 seconds.

g) Homework, max. 3h

  • Implement or finish the temp. sensor you designed.
  • Post the IoT platform data feed URL to the Slack.
  • Commit the Arduino code to the hands-on repo.
  • Measure the temperature for at least 24 hours.

Submitting results

Tools

Git

On your computer

On your computer or Raspberry Pi

  • Clone the repository
    $ cd ~
    $ git clone REPO_URL
  • Add a file
    $ git add FILE
  • Commit changes
    $ git commit FILE -m "Fixed all bugs"
  • Push changes
    $ git push

Wiki

Support

About

fhnw-iot-work-03-okaerin created by GitHub Classroom

Resources

Stars

Watchers

Forks

Packages

No packages published