I like Particle and their devices (Photon as well as new generation ie Argon/Xenon) very much. I think there is a serious gap between the world of makers and the world of production. One breadbord is cool when it is in your desk. Managing 100 instances of an actual industrial product is another story :
- How to monitor/control a device running at say, Vladivostok (no offense, Vladisvostok...)?
- How to update it ?
- What about updating 100 devices ? 1000 ?
- How to deal with the data 1000 devices are constantly producing ?
Particle tries to answer all these questions with their Particle Cloud software and devices...
So, here is a workshop about the main features of Particle Cloud. Idea is to build a simple IOT product step by step. Each step tries to demonstrate an important feature of Particle Cloud.Targeted audience is definitely developpers/architects.Disclaimers
I am a software engineer. Very very software oriented. After years (gosh ! I was even part of the first Internet bubble) of developing C++ code around DBMS connectivity & Machine Learning, I have discovered IOT ant its simple pleasures : Max 100 KB of RAM, simple C code, possibly C++, measure something real, trigger a physical action (Look ! the LED lit on!!).
All that to explain the hardware is not my best skill (the fitzing schema clearly demonstrates it) and this presentation is not about generally coding on micro-controllers neither specifically dealing with a SR-04 or an OLED screen but really about high level Particle Cloud's features.
I will say say a lot of good things about Particle and its Cloud. Note I am not related to Particle company in any way.
The best part of the fritzing schema is coming from https://github.com/tonyranieri/Photon-HC-SR04.
To be complete, note all IDS & access tokens visibles in this workshop have been randomized or obfuscated :)Design an IOT product using Particle Cloud & PhotonThe Hardware
The hardware is very cheap so it is possible to build several devices. For each instance, you will need:
- a Photon: A 3rd generation hardware like Argon or Xenon should work as well.
- a basic HC SR-04 sonar: Not very precise neither consistant but you can buy a bunch of HC SR-04 at ebay for almost nothing. And there is a photon library to manage it.
- a small OLED screen 128x64 using I2C: Very cheap too and standard Adafruit's SS1306 library is working like a charm on the photon.
- 2x470 ohms resistor: looks like optional. Plenty of sketches with HC SR-04 are not using it
The whole Fritzing file is here
You have to build at least 2 instances of this hardware:
- one will be used for development. 80 % of this workshop is using only this dev device
- one will be used to demonstrate deploiement on production
The more production instances you will build, the more dramatic last steps of this workshop will be.Basic features of the product
The OLED screen is able to display 2 panels:Software panel
- the version of the firmware
- The Photon's name
- The Photon's public IP address
- The uptime
- The last measure (valid or not) & the # of valid ranges
- The # of events (received and sent)
- The WIFI's SSID
- Strength & quality of WIFI signal
- The Photon's IP address on the WIFI
- The Photon's Mac address
- SR-04 measure distances every 100 ms
- A valid range is a distance between 15 cm & 25 cm for at least 10 measures
- A valid range is signaled by the Photon's LED flashing red for 200 ms
Final version of the product's firmware will be fully cloud and will manage/react to a set of variables, functions and events.
Here is the high level plan for the workshop.
Full details (setup, code snippets, points to show,...) are available in this repository.Product firmware step by step
The workshop will start with a basic, partial firmware and step by step, add more and more cloud features into a final production firmware and try to demonstrate itStep 1: Manage the sonar, Cloud compilation and Cloud variables
Demonstrate web IDE, Cloud compilation and Cloud variables and obviously, manage the sonar hardware.Step 2: Manage the OLED screen, Cloud Events and Cloud functions
Manage OLED screen and start to play with subcriptions to Events and Cloud Functions.Step 3: Manage Sonar as well as OLED screen
Merge the 2 previous firmware. Some convenient events will be added too.Step 4: Define a Cloud Particle Product
Add the only 2 lines necessary to manage a whole product and its fleet of devices. Manage release firmware and deployment on a fleet of devices.Step 5: Manage data generated by a fleet of devices: Cloud integration
A fleet of devices generates a serious bunch of data. Time to show the power of Particle Cloud integration. Demonstrate unpackaged integration with Particle Cloud as well as fully packaged one (ie Google Cloud integration)Annex : Particle Cloud SDKs & REST API