Background
The purpose of this project is to provide simple directions on how to play around with Python on Arduino DUE or Mikroelektronika Flip & Click board.
Preparation
Before you get started, download the installation for Zerynth Studio from http://www.zerynth.com/ . Zerynth Studio is powerful IDE for programming embedded devices in Python with cloud sync and board management features. For board you can use either original Arduino DUE or compatible Mikroelektronika Flip & Click. Installation of Zerynth Studio is very easy. Just start downloaded installer and whole process is automated.
An very intuitive and simple tutorial will be started on first start. Follow instructions and you will ready for two or three minutes to create first Python project for Arduino DUE.
Hardware Setup
I used three self made LED modules. Module is simple PCB with blue LED and resistor. These modules are connected to 8,9,10 pin on Flip & Click. An potentiometer for blink rate control is connected to A1 pin.
Enviroment Setup
Zerynth Studio IDE screenshot is on the next image. It is very simple and easy to use. On the left side you have project manager, package manager and one very useful tools : clone examples. Zerynth provide large number of examples to learn. Every example can be cloned in your project. I made this project from one of them.
When you connect Flip & Click, Zerynth will detect the board and give you instructions for next steps. First step is upload VM (virtual machine) to board. Virtual machine ?? Yes, core of this technology is virtual machine. VM running on the board and execute your Python code. Next step is uploading code to board. For all steps you have dedicated button at top of window.
Making project
First step is uploading VM into board. Click on most left icon, next to the dropdown listbox. Wait until uploading process has been finished. Next, on the left side of window, find icon "clone examples" and select "Sensor driven Multiblink". An dialog for cloning will be shown:
Click on the "Clone" button and new project will be created. At top left part of window you have two icons : Verify and upload. Click on upload, wait .... and that's it. Change analog voltage with potentiometer and watch how blinking frequency of every LED is changed... Multi-threading in action!
What next?
This is very simple example how to use Python on Flip & Click board. One question you could ask : is it really Python IDE? No.. You can not use "pip install <....>" as you can on Windows or Linux distribution. Zerynth provide some downloadable package for specific devices, and library is expanding... In next projects, I will focus on I2C and SPI senors. From my point of view, this combination of micro-controllers and Python has bright future.
Comments