Introduction: Spark Core - No Need to Write an IPhone App!
Bob and I are starting to work on a new project - more about that in a future Instructable - and needed an internet connected micro-controller. Of course the Arduino came immediately to mind, but getting it onto the 'net can be a challenge. We also thought about the Raspberry Pi but, again, getting it connected to the world at large is hard without a keyboard and monitor; our project will have neither of these.
Then we found the Spark Core, from spark.io. These Arduino-like micro-controllers use a nifty little trick from Texas Instruments to get them hooked up to the local WiFi network using any smart phone. We tried the Spark Core and loved them from day one. Oh, my friends were surprised to see me easily configure my Spark Core to talk to the local WiFi network. No cables, no coding, no muss, no fuss.
This is a simple Instructable that gives a brief description of what I did, shows you where you can try it out, and includes the files so that you can do it yourself. I hope you find this example useful. I hope you improve it. I hope to add it to Git Hub one of these days.
Step 1: What the Site Does
It will then take the first claimed core in that list and retrieve additional information about it. It will display a button on the web page for each function and each variable that your Spark Core code has exported.
With these links displayed you can then click a link to call your Spark Core application and either execute a function there or retrieve the value of a variable.
The code used on this web page is very simple so you can use it from an iPhone or iPad, just navigate to the URL from the Safari browser. You'll find that you can now control your Spark Core without having to write a native iOS app.
Step 2: How to Use It
You can see this simple web code in action by going to
You can also download the ZIP file on this page and set up your own web site to explore your Spark Core.
The web page will work with any Spark Core that has code with Spark.function or Spark.variable calls in it. The ZIP file has a very simple application you can load onto your Spark Core to see this all work.
When the sample code starts in your Spark Core, your core little blue LED should be blinking at 500 milliseconds.
- Click the button “Retrieve delayMSec”; you should see 500 displayed.
- Click the button “Call blinkLEDTo75”; the LED should be blinking at 75 milliseconds.
- Click the “Retrieve delayMSec” again and you should see 75 displayed.
- Enter “fifty” in the text box next to “Call LEDBlinkToSt” and then click the button. The LED should start blinking at 50 milliseconds.
- Click the “Retrieve delayMSec” again and you should see 50 displayed.
This is a very simple web page, but it does bring together the entire end-to-end chain needed to talk between your web page and your Spark Core.