Thanks to our partnership with XinaBox an amazing IoT kit has been brought on the market. The XK12 IoT Starter Kit is Zerynth programmable and ready for all your ideas. So, we thought we can offer a helping hand to those who are looking to get started with the kit and give you a detailed tutorial on how to do some LED blinking.
For this tutorial, we’ll be using the CW02 development board included in the kit. It’s based on the ESP-WROOM-32 by Espressif Systems and it’s powered by Zerynth, that means that the board already has a Zerynth license inside. All you need to do to activate it is enter a Voucher Code at the registration phase. One could say that we like to keep things simple and easy – just like this tutorial.
Getting Started with Zerynth and XinaBox
We’ve already covered all the steps needed for getting started with the board in a previous tutorial. Just to recap, you’ll need to:
- Assemble the CW02 xChip with the IP01 module (USB Programming Interface).
- Connect on a USB port of your laptop, where you’ve installed Zerynth Studio.
- Select the XinaBox CW02 on the Device Management Toolbar.
- Register the device by clicking the “Z” button from the Zerynth Studio. In this phase, you should redeem your coupon, as mentioned before.
- Create a Zerynth 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.
Blinking an LED using Python
After the virtualization, the XinaBox CW02 is ready to be programmed in Python and the Zerynth scripts uploaded.
Just search and clone the example “Blink”.
After that, we need to edit the code in order to set up pin attached to the LED. As you can see opening the pinout of the board, XinaBox CW02 has 3 LEDs, Red, Green and Blue, attached respectively at pin D25, D26 and D27.
Since we want to blink the green LED, edit the code as follows.
Now you can uplink the script into the board and you’ll see your LED blinking. That’s it, enjoy!