Skip to content

zarusz/Training_IoT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

Workshop materials for the IoT hand-on training. The training is based on the ESP8266 chip and Arduino framework. The training was first done at the TWF 2016 Conference.

The idea behind the workshop is to have a step-by-step tutorial on building Internet of Things (IoT) solutions. The initial exercises are simple and evolve over time.

If any questions please email me.

Resources

Prerequisites

Software

Ensure you have installed:

Windows PC is required.

Hardware Checklist

The training requires parts:

  • Chip
    • Module WiFi ESP-12E ESP8266 Black - 11 GPIO, ADC, PCB antenna
    • Adapter board ESP8266 ESP-12 / 12E / 12F / 07
  • USB-UART (flasher)
    • Converter USB-UART PL2303 - microUSB slot
    • MicroUSB cable B-A
  • Sensors
    • Motion detector PIR HC-SR501
    • Transmitter IR 5mm 940nm (TSAL6400)
    • Infrared Receiver 38 kHz (TSOP4838)
    • Humidity detector DHT22 AM2302
    • Module with 2 relays (photo-optic isolation)
  • Power
    • Stabilizer LDO 3.3V LF33CV - THT TO220
    • Power adapter 5V/2A DC
  • Other stuff
    • Breadboard
    • Male wires
    • 3x LEDs (red, yellow, green)
    • 4x 220Ω resistor
    • 1x 100Ω resistor
  • Computer (PC, MAC?)

Essentials

PlatformIO

Most important commands in PlatformIO:

  • Serial Monitor
    • PlatformIO > Serial Monitor
    • Shortcut: Alt+Shift+M
  • Build
    • PlatformIO > Build
    • Shortcut: Alt+Ctrl+B
  • Upload
    • PlatformIO > Upload
    • Shortcut: Alt+Ctrl+U

ESP8266

Boot Modes

Whenever the ESP is reset or powered on it checks the state of three GPIO pins to enter one of the boot modes:

GPIO15 GPIO0 GPIO2 Mode
LOW LOW HIGH UART Bootloader
LOW HIGH HIGH Boot sketch
HIGH x x SDIO mode (not used for Arduino)
  • LOW = connected to GND
  • HIGH = connected to 3.3V

The UART Bootloader mode is used to upload our program. The Boot sketch mode is used to execute our program (normal mode).

At startup ESP prints out the current boot mode:

rst cause:2, boot mode:(3,6)

More details are provided on the ESP Arduino wiki.

Layout

The ESP8266 12E looks like this:

During the workshop we are sing a breadboard adapter:

Instructions

Worth investigating

Extras

Additional information

Notes

  • Schematics are prepared using Fritzing.
License

TBD

Legal Notes
  1. This material is provided as is.
  2. The author is not responsible for any damage this might cause ;-)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published