Skip to content

EMIT Firmware Development Guide (MicroPython)

ControlBits edited this page Nov 8, 2020 · 2 revisions

Welcome to the EMIT Firmware Development Guide

The aim of this guide is to provide a tutorial style, step-by-step guide to developing firmware for EMIT.

The plan is to get you up and running quickly. Once you've completed sections 1 to 6, you'll have a fully functional Environmental Monitoring IoT sensor that transmits Temperature and Humidity data using the MQTT protocol.

Parts 7 to 10 are written as individual 'bolt-on' sections to help you add additional functionality such as logging data to the micro SD card, or using EMITs on-board relay to switch ON/OFF a local heater, fan or perhaps trigger an audible alarm.

EMIT supports both MicroPython and Arduino/C++. This version of the guide covers a MicroPython implementation using the Thonny IDE.

All of the code examples are available here on our GitHub repository.

Table of contents:

  1. Getting EMIT ready for firmware development
  2. Writing and uploading firmware to EMIT
  3. Measuring Temperature & Humidity with the AM2302
  4. Connecting EMIT to the Internet
  5. Adding an accurate Timestamp using NTP
  6. Transmitting data over MQTT
  7. Using the relay for control
  8. Logging data to the microSD card
  9. Adding a web server to EMIT
  10. Exploring EMIT's expansion connector

This guide is currently under active development ... to receive notification of additions and updates to this guide please subscribe for updates.

Clone this wiki locally