Experiences with a Particle Photon
Recently I had the opportunity to work with a Photon Device by Particle. These devices are small microprocessors1 with a few I/O pins. The special feature of the Photon is that it also includes a Wi-Fi chip2, so you can connect it to your local wireless network and to the cloud without having to add any additional hardware.
First of all, it is super easy to get into developing for it. The first steps and tutorials are easy to follow and everything pretty much works out of the box. Particle provides a web based IDE, which allows for new developers to just try coding for the Photon out without having to install an application on your PC. The web based IDE includes a “library” feature, which makes it possible to add libraries for common hardware to your project with two clicks. There are some for common NFC readers, displays, network protocols and others. You can compile and flash your code to your device with a single click, which automatically reboots the Photon so that it is running the most recent version of your code instantly.
So, for hobby programmers and prototypes the Particle Photon is a charm. It leads to quick results - I have had my first LED blinking within a few minutes.
Now, as with most products, this one too has some issues. It would have been too nice to be true otherwise. While the Photon is awesome for prototyping and quick development, I do not think it is suited for larger applications. There are a few reasons for it, most of which could be solved by some additional effort by Particle, so let us hope for improvement. Let us look at the list of issues I have encountered:
- Local IDE: While the local IDE is nice for longer development, especially when using version control tools like git, it has its difficulties. For example, while using the local IDE, only source files in the root directory of your application are compiled and flashed. No subdirectories. This is not a huge issue in smaller projects, but when you have developed for a while, things get… messy.
- Error Messages: Let me explain this one by example. Imagine you have just added a big lib to your application, added the necessary calls to it and started compiling. You see an error message and think “Well, there had to be something”. But instead of giving any useful information, the error message you see is something along the lines of “Could not execute…”. The rest of it is missing. Took me quite a while to figure out that this happens when there are two “.ino” files in the root directory. ino files are the files in which the compiler searches for the two entry point functions “setup” and “loop”. If two of those exist, the compiler does not know which one is the correct one and fails. Similar error messages are printed when you give the same filename to a .ino file and a .cpp file.
- Resetting to a working firmware: When your firmware is broken and e.g. runs into an endless loop, it is sometimes hard to get the Photon back to a working state. Having to manually put the device into DFU mode and then flashing over USB is overly complicated in my opinion.
It should be rather easy to solve most of these issues. However, while they are not fixed, the Particle Photon will just stay a prototyping device for me.
I really hope for them to improve their devices. Just recently they have added the RedBear Duo to their store, which is a similar device as the Photon but also contains a chip for Bluetooth Low Energy. If I get the chance I will give the RedBear a try as well.
That wraps it up for today. Continue developing awesome software!
Footnotes: