Skip to main content

Zerynth workshop at Wuthering Bytes 2019

During the fourth day of the Wuthering Bytes festival, the Zerynth team conducted workshops on developing applications using Python for IoT and Industry 4.0. The team was supported by DesignSpark, throughout the two particularly crowded workshops.

The popular tech festival, interestingly called Wuthering Bytes, has been happening every year since 2013 in Hebden Bridge in West Yorkshire. Each workshop had around 30 attendees. Just the right number, so that everyone can learn at the same pace.

Each participant also got a free PSoC6 development kit. After all the knowledge they’ve collected, we hope they’re programming them in Python with ease.

ZerynthWorkshop_46b8d8a77d58463155047ce03b64bc6db6f9a7cd.jpg

Zerynth is an open-source software platform that allows developers to program microcontrollers in Python or hybrid Python/C and connect them to the Cloud. The platform can essentially help to reduce the complexity of software developing for embedded systems. It supports most of the 32-bit microcontrollers (ARM Cortex M0+, M3, and M4; ESP32, ESP8266). DesignSpark users have exclusive access to some of the MCUs/boards that are supported by Zerynth. Available cloud integrations include Microsoft Azure IoT Hub, Amazon Web Services IoT, IBM Bluemix, Google Cloud IoT and others.

The workshops were based on Cypress PSoC 6 + WiFi-BT Pioneer Kit (175-4669)  and air quality sensor (882-9020).

Here’s a short summary of the workshops:

Getting started with Zerynth and Cypress PSoC 6

Simplified instructions for installation are provided below.

  1. Download Zerynth Studio: https://www.rs-online.com/designspark/zerynth
  2. Install Zerynth Studio on your laptop (64bit required).
    Choose “Online Installation”, then “Expert Mode”, then select “PSOC62”.
  3. Windows users: install Cypress Programmer Tool
    Linux users: some udev rules need to be added:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="f148", ENV{CY_KP2_PID_VID}="f148:04b4"

SUBSYSTEMS=="usb", ATTRS{interface}=="KitProg2 CMSIS-DAP", ENV{CY_KP2_PID_VID}=="f148:04b4", MODE="0666"

After the installation, it was necessary to sign in on Zerynth Studio with a DesignSpark account. Once connected on a USB port, if drivers have been correctly installed, the Cypress PSoC6 device is recognized by Zerynth Studio. Then it’s just necessary to virtualize the board and you’re done.

In case there is a problem when programming the PSoC 6 board, please refer to the community forum on Zerynth website.

Accessing PSoC 6 board

Cypress PSoC WiFi-BT Pioneer Kit contains the PSoC 6 WiFi-BT Pioneer Board, TFT Display Shield, USB Type-A to Type-C cable, jumper wires, proximity sensor wires (5 inches each) and a Quick Start Guide. The display shield is connected to the PSoC 6 board through headers. Expansion header is compatible with Arduino Uno 3.3-V shield and Digilent® Pmod modules.

The first set of exercises were focused on teaching attendees how to access PSoC 6 board components. Specifically, attendees practiced how to write a simple program for RGB LED (LED 5) and CapSense slider and buttons.

Zerynth Studio contains a selection of examples that can be used as a starting point if you are new to programming with Python. The exercises at the workshop were based on “Blink” and “CapSense” code examples available in the software.

Cypress PSoC +WiFi-BT Pioneer Kit

Cypress PSoC +WiFi-BT Pioneer Kit

blink_21b19717fb48a07ec5dd4884addea4738a4c4e9a.pngBlink example

capsense_5fb2d1a78bf6667b4a0ecfd81970a2016d17df62.pngCapSense example

Sending data from air-quality sensor to OkDo cloud

For the second part of the workshop, the TFT display shield has been replaced by an air quality sensor (MQ-135) that can detect dangerous gases within the office and homes such as ammonia, nitrogen oxides, benzene, smoke, and CO2. 

MVIMG_20190902_133154_2511ed043edfa7f484711db6def63d7421c659e0.jpg

PSoC 6 board, TFT display shield, and air quality sensor

The participants were asked to collect data from the room by connecting to the air quality sensor on the board. After that, they have been taught how to connect to the cloud, specifically, OKdo cloud service, and observe the live data.

livedemo_f55501adcfc882185575c8b790269df58c7fa641.pngLive data from the air quality sensor on OKdo platform

It seems that all of the attendees had quickly learned how to program the PSoC6 board in Python, with Zerynth tools. Below, you'll see a small example of what they thought about the workshop.

review1_a2b9982dcde79a44a7ccd528c8de1cd121ad3143.png

review2_2940f6f9aef8e1116f1579838bca90d28f49318f.png

More resources

Gallery

MVIMG_20190902_1014411_30f693c34cbb45c6f098ce385adcefbf1fb66fd1.jpg

MVIMG_20190902_101521_08da7d8da3226a94c55ec3886cb1f1c7ab8896d3.jpg

MVIMG_20190902_101419_e542dd6eee8c92e362bae4fe5734d75e8094d3e8.jpg

I am an electronics engineer turned data engineer who likes creating content around IoT, machine learning, computer vision and everything in between.
DesignSpark Electrical Logolinkedin