Wednesday, April 15, 2015

Working with the Spark Core on an Ubuntu-running Chromebook

Recently, Zach Feldman of NY Code and Design Academy, kindly lent me an Ubuntu-running Chromebook. With this, I continue on my project from the perspective of a Linux user instead of Windows. Moreover, I've discontinued use of the Sensor Tag, and instead have switched to using the Spark Core and again, the Adafruit sensors (accelerometer and gyroscope). This change seems beneficial as I found it personally difficult to use the Sensor Tag and use its libraries, whereas the Spark Core uses Arduino-based coding which I am more familiar with (as I haven't learned enough Android App development yet for the Sensor Tag).

For starters, my first goal was to connect my core to my Spark account and to the WiFi. You can find all the helpful instructions for this at the Spark Documentation: Connecting your Core. Seemed simple enough, but instantly I already found my first problem. Strangely, it seemed to be unable to find the spark core and connect it with my Android phone (Galaxy S3). However, Spark planned for that occurrence, and provides instructions to connect to the core manually. And so, following the Spark Documentation, I tried connecting to the core manually using the command line terminal. To be frank, it was somewhat difficult following the instructions for this because it is my first time working with Ubuntu.

If you are trying to connect your core manually, you'll be linked to the Github page for this. If you are using Ubuntu, DO NOT install node.js. If you read further, it provides another link to separate instructions on what to type into the terminal. However, when I typed "$ spark" and then "$ spark setup", I still kept getting the error that read something like "is your core connected? Make sure it's blinking blue". It was blinking blue, I swear! However, what I learned from my mentor, Sara Chipps, was that every time you plug in your core specifically to an Ubuntu computer, you have to first type in "sudo chmod 666 /dev/ttyACM0" before you type "$ spark setup". Why? I'm not sure, but it works! haha.

After you type in "$ spark set up", you should type in your log in information you may have created earlier on the build sign up. Then you will be asked to assign a WiFi network to the core and also name it as you please. Then you can log in on and your core should already automatically be recognized by your account. From here, you can start programming!