Software apps and online services
Pay attention: you will lose all Particle functionality when doing this!
This is a step by step guide for Windows-User to program a Particle Photon in Python instead of C/C++.
After following the guide you open the Phyton door with the "Hello World"-example.Follow the guide
- Install the Zerynth IDE - during the installation-process there is an online/offline-Updater.
- Login via your Facebook/google-Account or sign up
Zerynth Installation-Guide: https://docs.zerynth.com/latest/official/core.zerynth.docs/installationguide/docs/index.html in case of problems.
OK - here we are - let´s follow the Getting-Started-Guide: https://docs.zerynth.com/latest/official/core.zerynth.docs/gettingstarted/docs/index.html
- Create a Zerynth User Account - checked in the step before
- Connect, Register and Virtualize your Device
I plan to do the Zerynth virtualization with a Particle Photon: make you aware that you are playing a new firmware. In the future, you will use a different tool environment than the Particle Cloud. The prerequisite is that the Particle drivers were installed on the Windows PC, so that the Photon appears as a USB device in the Windows Explorer.
In contrast to the claiming process with Particle, a USB connection to a PC is necessary here.
- Hold down BOTH buttons (reset and setup);
- Release only the reset button, while holding down the setup button;
- Wait for the LED to start flashing magenta, then yellow;
- Release the setup button; the device is now in DFU Mode (yellow blinking LED);
Select the Photon on the Device Management Toolbar;
Register the device by clicking the “Z” button from the Zerynth Studio;
The registration is also possible, if you have previously claimed the photon in the Particle Cloud in your account.
Preparation in case of Errors:
- choose other USB-Port
- check/Change your USB-cable: you Need power and data-transfer-function
After the successful registration the Photon should flicker the green LED.
- Create a Virtual Machine for the device by clicking the “Z” button for the second time;
Before you can click the "Z" button again bring the Photon again in the DFU Mode - else you cant click the "Z" button (is not active).
- Virtualize the device by clicking the “Z” button for the third time.
A lot of preconfigured virtual machines are offered for installation. In the Free-Zerynth version you can use the "Standard VM" for free, which simplifies the decision.
The creation of the virtual machine takes only a few seconds and goes straight to another dialog. In the log of the Zerynth console the success can be controlled. The Photon is still in DFU Mode and flickering yellow.
Please do not ask me how many VMs the Photon can handle.
After click "Virtualize" you choose the VM "Standard VM" and after a few seconds the Photon is ready with a view in the log.
In my case, although I have received a successful message for the virtualization, but also an error message which made me a little startled. The photon is probably restarted, because now only the usual blue control light on D7 was active but in the target "No device ..." is selected. Even after selecting the target "Particle Photon" via USB, there is no change and the Photon flickered "red" for 3 seconds; after the LED is off.
Enjoy. This is normal!
Clone (blue button) the "Hello World"-Example from the menu "examples" left side to your local PC:
Verify and Uplink the code to the Target Particle Photon via USB (Pro version from Zerynth Studio necessary for Firmware over the air - FOTA).
The tricky part is now: you can watch the upload in the log with the receipts and then pay attention: as soon as the upload is completed you will be asked to reset the photon - act courageously and quickly! Press the RESET-Button on Photon.
This short video at min 3:07 describes the tricky part:
Source: Thanks to Tim Stoddard!
In case of problems try this:
- Double check if you correctly press RESET on the board when asked by the Studio.
- You can also try to re-register/virtualize the board or
- try to change the USB port.
- running the latest version of Zerynth?
Check the result of the output with the serial monitor named Console:
Gratulation!For your understanding
- While using the Zerynth functionality, the (previously claimed) photon is still listed in the Particle Cloud but can no longer be addressed. This is now equipped with a virtualized machine and communicates with the Zerynth cloud.
- There are two separate platforms: Particle Cloud and Zerynth - is there an interaction between the two platforms or are they both completely self-sufficient? > They are two separate platforms.
- My photon is already registered / claimed in the ParticleCloud and used under my Particle user. What do you recommend to me for aprocedure: first remove the claiming and log in to Zerynth or can avirtualization be carried out with a claimed photon? > a virtualization can be carried out with a claimed Photon.
- How is the technical way back if the user decides not to use Zerynth? > Just flash the new code (C/C++, Arduino or whatever you want) on your board).
Zerynth is a development suite for IoT solutions, that enables Python programming on 32bit Microcontrollers and allows easy connectivity to cloudproviders like AWS, Google Cloud, Microsoft Azure, Ubidots, and many more.
Many MCU and board producershave already chosen Zerynth as Third-Party Development Tool:
- Microchip: https://www.zerynth.com/blog/zerynth-is-an-official-microchip-third-party-development-tool/
- Flip&Click by Mikroelektronika: https://www.mikroe.com/flip-click-to-be-officially-supported-by-zerynth-bringing-python-compatibility/
- Hexiwear by NXP and Mikroelektronika: http://www.hexiwear.com/programming-hexiwear-in-python/
- RedBear BLE Nano2 andBlend2, based on the Nordic nRF52832 BLE chipset: https://www.kickstarter.com/projects/redbearinc/bluetooth-5-ready-ble-module-nano-2-and-blend-2/posts/1812287