Particle.io

From makernexuswiki
Revision as of 16:28, 13 December 2017 by Jschrempp (talk | contribs) (Created page with "Unfortunately their community pages are long, long conversations that are not trimmed up and easy to read. Once you find a gem of information, post it here. == Particle.io (f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Unfortunately their community pages are long, long conversations that are not trimmed up and easy to read. Once you find a gem of information, post it here.

Particle.io (formerly Spark.io)

This is an "Arduino-like" processor. So far it has run all my Arduino code without a problem. We even brought over some other libraries and they worked. This platform easily connects to WiFi and Particle.io runs a cloud based service that makes talking to your core easy. Once the Particle Core is on WiFi then you can compile your code for it using either a web browser or their Particle Dev application on your local computer. In either case your software is compiled in the Particle Cloud and then pushed down to your Particle Core. This is beautiful. There is no need to be anywhere near your Particle Core when you send it new software.

The Particle firmware contains libraries that let you expose a local variable on your core, or a local function. Then these can be called from any web browser. Thus you can interact with your software on your core from anywhere in the world. Lastly, they offer Spark.publish which your software can call to send short messages through the Particle Cloud service (free) to anywhere. Your own server could monitor the Spark Cloud for alerts from your core(s). IFTTT.com offers a channel for Spark. I've had my core publish events to the cloud that IFTTT picks up and turns into SMS messages to my phone. IFTTT could also add events to a Google Docs spreadsheet.

The original Spark Core cost $35 and was configured via an app on a smart phone. In June 2015 they will ship the new Photon which costs $20 and I believe will be configured via its own WiFi hotspot (like the way Chromecast is configured). In October 2015 they will ship the new Electron which will offer cellular data connectivity for $3/month. In October they are also planning to release a solar power kit for the Electron. With all of this you will be able to put an Electron on the top of any local mountain and interact with it forever. Wow.

Photon

String concatenation

We found a bit of code that would compile and run on the Spark Core, but not on the Photon. Here's the workaround:

  • original code: bufferReadout += Time.timeStr(index);
  • revised code: bufferReadout += Time.timeStr(index).c_str();

Javascript

I wanted to interact with my Spark Core through the Spark Cloud. I wanted to do it without having an active web server, so I wrote code to do it in Javascript (a nasty language to work with). The page I wrote will allow you to log on to your Spark account, get information from your core, and then send messages back and forth. To use this you only need the Javascript code to run in your browser. The current version of my code will read the Spark Cloud to get a list of variables and methods that your core firmware exports. It also monitors your core for any Publish events it sends. You can run this from my web site, or go there and download all the code so you can modify it and run it anywhere you want. The download includes a simple sample firmware app to run on your core. But the web site also works with the factory installed firmware. http://shrimpware.com/SIS

Flashing Green does not connect

After much fooling around and Google searching I found that the Spark Core would not connect to my WiFi because I was using WEP encryption. Once I switched to WAP it worked fine. My Spark Core was working fine for weeks sitting next to me in my office (20 feet from the WiFi access point). Then one day it started dropping the WiFi connection and could not recover it. After a lot of searching I decided to move it closer to my WiFi access point (8 feet) and it worked reliably again. Weeks later I moved it back to my office and it worked fine for a few days; then it did not. My assessment: In my office the WiFi signal is strong enough most times, but occasionally someone/thing near by our house starts transmitting (perhaps the police station?) in a way that prevents my Spark Core from connecting when it is 20 feet from the WiFi access point.