Time to let RoboBrrd soar into the clouds! OK, maybe metaphorically speaking. In this guide you will be able to connect any Arduino-compatible robot with MyRobots and update its sensor data!
We will be using an Arduino and Processing to send your robot’s data to MyRobots. The data will be transferred through the USB cable via a serial connection, so your robot won’t need an onboard Internet connection.
The same process in this guide will work fine on any configuration of Arduino-compatible robots; you will just have to tweak what pins and what data to your specific needs.
To complete this guide you will need an:
- Internet connection
- Account on MyRobots
- Arduino (and preferably a robot)
Here are the resources we will use:
You can look at all the code for this guide on Github:
With that said, let’s get started!
Step #1: Next
- First, create a robot on MyRobots.
- You can customize your robot/channel with your robot's information
- Go to Manage Robots, and then to your robot.
- Grab the API Key on the robot's information.
Step #2: Next
- Open Processing and create a new sketch. You can download the example SimpleThingSpeak sketch on Github.
- Set APIKEY to your robot's API Key.
- Run the code. Make sure you see the numbers appearing in the monitor below.
- You will know if your data is sent successfully when you see the entry_id number in the monitor.
- Also check that the data is being displayed on your robot's graph on MyRobots.
Step #3: Next
- Use Firmata on your robot's Arduino microcontroller (File>Examples>Firmata).
- For this guide, I'm using the analog example: SimpleAnalogFirmata.
- The benefit of using Firmata on the robot is that we will be able to easily access the sensors from the Processing sketch!
- Mix in your robot's code with the Firmata code.
- In this case, RoboBrrd will just be updating its eyes and doing a random movement.
- You can look at the example code used in this guide on Github here!
Step #4: Next
- Open the arduino_input Processing example sketch (File>Examples>Contributed Libraries>Arduino).
- Run it to test the sensors and the communication.
- Combine the Arduino Processing code with SimpleThingSpeak to access your robot's values.
- You can get the example ThingSpeak_Firmata sketch from Github here!
- Run the sketch! Watch for the updated sensor values and make sure that it is sent to MyRobots.
- Congrats, you are done! Now your robot's sensor data can be accessed from anywhere in the world, by anyone and any robot!
- If you want to add more data to what your robot is sending, you can look at the MyRobots API here.
- Go crazy with it! ThingSpeak is a pretty awesome platform that can do interesting things with your data. Happy hacking!
There are many more interesting things that you can do with MyRobots and the ThingSpeak platform. You can read more about it on their documentation here and here!
Add on more features and capabilities, this guide was meant as a stepping stone to help get the connection started!
This tutorial is part of my fundraising effort for travel expenses to go to Maker Faire Bay Area! I'm trying to answer the question: "How many MAKE Projects does it take to get to Maker Faire?" So if you like this tutorial, you can donate towards my travel expenses here! Thanks for checking it out!
If you enjoyed this tutorial, you can visit my website where I am up to all sorts of shenanigans!