Wearables and IoT

The wearables market is booming with predictions of more than a $10B market size by 2020. Despite the encouraging numbers, this is not an easy market to access. Designing smartwatches or fitness bracelets is a tough challenge as consumers expect lots of functionality alongside with a compact form-factor, lightweight, and long battery life.

From a technological point of view, wearables could be one of the greatest applications of the Internet of Things and Zerynth’s contribution to enable this world is reality.

Hexiwear meets Python thanks to Zerynth

As reported in this thread in the Zerynth Community Forum, we’re happy to announce that Zerynth officially supports Hexiwear, one of the most loved wearable IoT development platforms!

Why programming Hexiwear using Zerynth?

Hexiwear has been designed by MikroElektronika in collaboration with NXP to better support projects and products by accelerating their time to market, reducing development costs and securing their migration from prototype to production. A vision that matches perfectly with Zerynth, with its platform for developing embedded devices in Python using paradigms and features typical of personal computer (PC) and mobile programming.

Hexiwear specifications

This open-source reference design brings together everything developers need to design their next wearable IoT application.

The main element is its power-efficient Kinetis K64F MCU, featuring:

ARM® Cortex®-M4 core;

max frequency up to 120MHz;

1024KB Flash, 256KB RAM;

many peripherals (16-bit ADCs, DAC, Timers);

interfaces (USB Device Crystal-less, UART, SPI, I2C, I2S, SD-card).

Integration is also a key feature of Hexiwear, with a Bluetooth Low Energy (BLE) SoC (Kinetis KW40z) and 8 Sensors onboard:

6-axis Accelerometer and Magnetometer combo (FXOS8700CQ);

3-axis Gyroscope (FXAS21002CQ);

Pressure sensor accurate up to Altitude sensing (MPL3115A2);

Temperature and humidity combo (HTU21D);

Ambient light sensor (TSL2561);

Optical Heart rate sensor (Maxim MAX30101).

It also includes a 1.1” OLED color display and a 190mAh 2C Li-Po battery with a charger (MC34671).

Along with the Hexiwear device, you also need the Hexiwear Docking Station, that allows developers to easily program their code and expand the board features with up to three click boards™ among a portfolio of more than 200 references.



Get started with Hexiwear and Python

Download and Install Zerynth Studio

First of all, of course, you have to download and install Zerynth Studio, our professional IDE that provides a platform for developing your Python (or hybrid C/Python) code and managing your boards. It includes a compiler, debugger and an editor, alongside tutorials and example projects for an easy learning experience.

Zerynth Studio is cross-platform. If you didn’t do it yet, download it here for free! Once you’ve installed it, open Zerynth Studio and create a Zerynth user account.

Connect and Virtualize the board

To start using Hexiwear with Zerynth Studio, first you have to connect the device to your PC through the Hexiwear Docking Station. In particular, it has an onboard DAP Link circuitry that exposes a serial port over USB. You can find it below the Power LED, as shown in the following figure.

DAP Link should be supported natively by all platforms. So you don’t need to install any driver!

Once connected to your PC, Hexiwear device can be seen as a Virtual Serial port and it is automatically recognized by Zerynth Studio. The next steps are:

Select Hexiwear on the Device Management Toolbar. To complete this step a “Disambiguate” operation may be required because the docking station shares the same hardware of other Zerynth supported boards. Just click on the field above “Ambiguous Devices” to “disambiguate” it and then choose “Hexiwear (Docking Station)”.



Hexiwear on the To complete this step a “Disambiguate” operation may be required because the docking station shares the same hardware of other Zerynth supported boards. Just click on the field above “Ambiguous Devices” to “disambiguate” it and then choose “Hexiwear (Docking Station)”. Register the device by clicking the “Z” button from the Zerynth Studio. If you notice it’s taking too long, press the left reset button on the Docking Station.

the device by clicking the “Z” button from the Zerynth Studio. If you notice it’s taking too long, press the left reset button on the Docking Station. Create a Virtual Machine for the device by clicking the “Z” button for the second time;

a Virtual Machine for the device by clicking the “Z” button for the second time; Virtualize the device by clicking the “Z” button for the third time. Flash the Zerynth Virtual Machine into the device.

Once you have installed the Virtual Machine you are ready to program the board.

Clone the example and uplink it to the Hexiwear

Zerynth Studio includes a specific example for the Hexiwear, that you can clone with just a few clicks. You can find the example in the “Examples Browser” panel or you can use the “Quick Search” feature, searching for “Hexiwear”.

Once you have cloned the example, uplink the code to your board.

Let’s take a look at the original code in the “main.py” file: here is where you develop the logic of your Python script.