I ordered a Pebble Time through their Kickstarter project earlier this year. I was trying to think of a neat project I could build using the accelerometer, and then I thought I could use it to control a robot. I went to RobotsConf last year, and received a SumoBot kit. It included a wooden chassis, wheels, servos and a battery pack to power the robot. I then added Particle's Spark Core WiFi based controller.
All pebble's come with a builtin accelerometer that you can use to recognize taps and G forces around the x, y and z axis of the watch. I then went about writing code I could use on the Spark Core, Pebble and an Azure website to control the robot.
The Pebble app uses a framework called PebbleKit.js to send messages to the phone from the watch called AppMessages. You can write Javascript functions to handle these app messages, and then make HTTP Rest calls to the web.
I then created an Node.js application to accept those web requests. I could have just used the Particle cloud to handle these requests, but I added a front end to the Node.js application so I could use WebSockets through Socket.io to debug my Pebble App.
The last step was to write firmware for my Spark Core that used their Cloud API to call a function for controlling the servos on the Sumobot.
Comments