Posting a Project to Hackster.io

(Update 2/18/2015):  I received an email from Ben, one of the Hackster.io founders in response to the feedback I had in my blog. In it he mentioned that they had already been working to improve some of the areas I mentioned and were definitely open to suggestions for improvement. I am psyched about their future updates and the possibility of improving the community with a more social experience. Also excited to attend the Hackster Hardware Weekend in Seattle and see what they have in store!

I recently posted up my Internet Connected Spark RGB Strip project to Hackster.io and despite a couple annoyances, found myself being drawn to posting up more content. It has become so common for websites and content aggregators to gamify their content in order to draw people to continue using their system. (Respects,Views, and Rewards in Hackster.io are similar to Likes and Follows in Instagram, or Likes, Views, and Subscribes on Youtube). Something to keep in mind for my future web/mobile projects will be to gamify certain aspects.

hackster

What Hackster.io does well:

  • They provide a broken-down view of projects that might be of interest to Makers and Hackers. (By platform, trending, or latest)
  • They make it somewhat easy to create a project and it’s pretty straightforward.
  • They monitor their content for spam and cool projects.
  • They gameify their content so that as a project creator, you want to make and post more.
  • They have drawn in a lot of cool projects already!

What they need to work on:

  • Adding useful content is WAY too tiresome and formatting is a huge pain on their site (it’s easier to link to other sites where your content is already hosted, but then you are less likely to interest people with your project page).
  • For Github project owners who want to show code or their README has all the content, transferring it over to Hackster.io’s projects should be painless and update when the Github README changes!
  • It would be nice if they were faster about monitoring and responding / notifying a project owner that their project has been accepted and made public.

I will continue to use Hackster.io for posting my projects and I think that with time they will improve their content creation system and gain some real traction for the Maker counterpart to Instructables.

Updated Experience with Spark Core

After a week of continual use with the Spark Core I have an updated view on the Spark ecosystem.

It’s incredible how easy it is to develop and connect your core to sites developed in Node.js (check out the project I made: http://sparkrgb.azurewebsites.net/). The biggest part of that project was making sure the RGB strip worked and the UI for the website interface. Connecting the two together was the simplest part. The only major disadvantage to using the Spark ecosystem is the fact that you are required to use their Spark cloud to communicate to your device. (Although they are open sourcing a spark-server on Github, it uses the same format as the Spark Cloud.)

Here are some of my personal remarks on the ecosystem:

  • Connecting the Spark to a Mac is pretty easy through USB, but doing it on your Windows machine requires a little more driver interaction. See my blog post on that here.
  • Resetting your Spark’s preferred WiFi connection with the mobile apps is horrible when you compare it to the simplicity of using the command-line interface on your development machine through USB.
  • The Spark Core remembers 7 WiFi credentials. If you add an 8th it will remove the 1st.
  • In order to compile an INO into the firmware, an internet connection is needed on your development machine at least, so there is no way to develop on a self-contained network even if you do not plan to use internet connected capabilities.

Overall, I think that the Spark ecosystem provides the best experience for developing IoT devices currently.

Add Speech Recognition Easily!

Just found out about a cool HTML5 Web API that is built into Google Chrome.

microphonedisabled

Since it is vendor prefixed, this API will only work if a user’s browser supports it (for now Chrome). The cool thing about it though is that in order to use it on your site, all you need to do is write some javascript that checks for “webkitSpeechRecognition” and then creates an instance of it, and then use it. Combine this with your IoT devices and you’ve got voice enabled commands for your interacting with your devices!

This tutorial walks you through the basics of how it gets integrated:
http://updates.html5rocks.com/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API

This is the full sample: https://github.com/GoogleChrome/webplatform-samples

Developing for Spark through USB

Although the Spark Core is perfect for IoT developers, you don’t NEED to connect your Spark Core to WiFi to code on it or have it run some firmware. (Although you will need it on your development machine)

By placing the following line of code at the top of your file, your spark will not try to connect to the internet when booting.

You will need to install spark-cli and login:

To flash your code onto your Spark via USB, your spark core needs to be put into DFU (Device Firmware Upgrade) mode:

  1. Hold down BOTH (RST and MODE) buttons
  2. Release only the RST button, while holding down the MODE button.
  3. Wait for the LED to start flashing yellow
  4. Release the MODE button

The core should now be in DFU mode

You will also need to install dfu-util and add it to your system path so that your development machine can recognize your Spark core and flash it.

(If you are using Windows, I suggest dfu-util-0.8-binaries.tar.xz)

Here is a great tutorial for installing the DFU driver. They use Zadig to install the driver for the Spark core so that your development machine will recognize it.

Once you open Zadig, click Options -> List All Devices
Select the device “CORE DFU” and the “libusbK” driver, then click Install Driver.

Now you can open up your terminal again and type the commands:

(Note: You will need to set your Spark to DFU mode every time that you want to flash new firmware onto it through USB)

Node.js with SparkJS on a Website

Never used Node.js before? Want to test out SparkJS? This is the guide for you.

Background: I have done some development in Node.js before to build websites and small maker projects, but it has been a while since I touched Node.js, so I needed a refresher when I decided to work with the SparkJS package.

Things you will need:

Install node & npm

This will start up the basic express web server that you can navigate to from a web browser by going to the url: http://localhost:3000/

Create an index.html file in your myapp\views folder with the content from here:

Add another line at the end of the index.jade file that says

The whole project can be found at https://github.com/anthony-ngu/sparkjs-example

In order to download the proper node modules, you will need to run the following command from the example directory:

Reading Material:

First Impressions with Spark Core

Spark Core Package

WOW this thing is small! (and that’s a good thing) It’s roughly the size of a USB thumb drive and includes WiFi, 8 analog pins, and 8 digital pins.

 

Spark Core in PackageSpark Core on Board

The initial setup instructions of the Spark Core were all online at http://docs.spark.io/start/. The setup process really shows the strong suits of the Spark Core in the wireless setup instructions as well as communication to the Core through an iOS or Android app. You can also connect it via a computer, but the simplicity of the mobile connection startup was unique.

My troubles with the “Getting Started” process were in the WiFi connection. Since my Spark Core was the uFL connector type, trying to connect to my router from across the room did not work without an antenna. However, once I realized that the problem might be the signal strength, my setup process worked flawlessly after I tried the pairing process with both the Spark Core and my iPhone right next to the router.

After setting up the Spark Core, I was able to toggle the digital pins from the iOS application seamlessly, the only thing to note is that the digitalWrite does not register until after you exit the change state dialog

Spark iOSIn order to push the change to the board, it needs to look like this:

Spark iOS2

The examples are easy to code and run via the web IDE or dev software and SparkJS allows for easy web development through Node.js to connect to and call functions that have been flashed to the firmware on the Spark Core. Overall, the Spark Core provides a true out of box IoT (Internet of Things) device. I’m excited to start using it for some of my projects!