Session

Rapid Prototyping for IoT

An NGO needed to detect when their remote water tanks were running low, so that they could provide more reliable access to drinking water. We designed a sensor system that sends alerts via SMS when the water level drops. Two evenings later, a working prototype was built and on its way to Sierra Leone for testing. It cost less than a Norwegian beer, and the code spans less than 100 lines.

Rapid prototyping such as this water level sensor is made possible by using high-level programming languages on IoT devices. Languages such as Python and Javascript are surprisingly effective for creating simple and even complex programs for microcontrollers and other embedded systems. No flashing required, simply upload your .py or .js files to the controller over USB or WiFi.

Sensors, displays and input devices have become cheap and readily available through mainstream retailers, and drivers for these devices are easy to come by, owing to a vibrant open source community. It’s now easy to make your own weather station, garage door opener, mp3 player or a toy for the kids.

In this workshop, participants are given a custom made game controller packed with hardware components such as displays, buttons, joysticks and sensors. Drivers and example code for each component will be provided. We will use MicroPython, an easy-to-learn language for developers of all backgrounds. Interactive workshop exercises may include:

- Gathering sensor data and pushing it to the cloud
- Coding an autonomous robot car
- Writing a multiplayer game using the game controllers

MicroPython is a lean and efficient version of Python, rewritten in C and specifically designed for constrained systems. It comes with a complete parser, compiler, virtual machine, runtime system and garbage collector. Uploaded source code is compiled dynamically on the chip itself. MicroPython is quickly gaining popularity in parts of the industry and is already being run on commercial products.

We will cover
- The powerful ESP32 microcontroller
- Embedded vs normal systems

- Getting started
- Initial, one-time flashing of the MicroPython firmware
- Uploading your code to the microcontroller
- Connecting to the interactive shell
- Using built-in python modules

- Interfacing with your hardware components
- Writing your first program
- Task scheduling (preemptive, cooperative)
- Internet connectivity and messaging
- Strategies for code optimization

Sebastian Roll

Co-founder ByteBarista

Trondheim, Norway

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top