Octoblu ( See Getting Started Video ) is a sweet platform for quickly and easily building IoT applications and infrastructure. You can visually tie together webservices and devices in numerous ways and add logic on the fly and deploy an application to the cloud in minutes. Its an ideal platform for posting messages from sensors to, because then you can make that data do darn near anything!
What you'll need
-
Sparkfun CC3000 Wifi Shield ( Adafruit wifi shield works too, pins are just different )
- Arduino IDE
- Sparkfun WiFi Library
- Octoblu Account
Install Arduino IDE and Libraries
Download the Arduino IDE installer for your OS. Then download the Sparkfun Wifi Library. After that you'll want to install that library to the Arduino IDE. Follow this guide.
Open the cc3000_meshblu_analog Example in the Arduino IDE
Open this example in the Arduino IDE. We're going to change a few lines before uploading.
We need to add a device UUID and TOKEN. It is important to have a basic understanding of Octoblu at this point, so if you haven't yet, watch our videos.
Create a Device UUID/TOKEN in Octoblu
- From app.octoblu.com go to the CONNECT page. Click ADD NODE
- Select "Generic Device" from the available options.
- From the page that follows select ADD NEW from the drop down menu. Click save.
- You'll be taken back to the Designer page, go back to the Connect Page.
- Click on the Generic Device you just added.
- Your UUID is immediately shown.
- Your TOKEN is shown only once, it resets everytime you want to see it so.
Edit Arduino Sketch
- Add your UUID/TOKEN to the example sketch where it says "//constants"
- Enter your wifi credentials.
Sending Messages
Below is a snippet from the example sketch which shows you how to send messages. You could just pass any string into the payload variable and it will send to Octoblu, but you can manually write JSON and it will it easily allow you to add multiple values.
In Octoblu, if you create a flow with your new Generic Device node wired to a debug node you will see this output every second:
"msg" : { "payload" : { "x" : 456 , "y" : 300 }
Comments
Please log in or sign up to comment.