Skip to content

Part 3. Send Test Data

Rachel edited this page Nov 24, 2015 · 2 revisions

To make sure that connecting to the hub is actually working, we’re going to run a little sketch on the Cactus Micro.

Make sure that your Pi and Cactus Micro are connected to the same WiFi network!

I just called the sketch "little" but it's actually quite long. We're doing a lot of error handling for the WiFi chip whenever it tries to run different AT commands.

The sketch is called Hub_Test.ino in this repository.

There are some parts of the sketch that you need to edit:

  • Under the section labeled "Initial State Streamer", add your hub's IP address on line 13. Make sure that the port on line 15 matches the one your hub is serving on.
  • Under the section labeled "WiFi Settings", add your network's name and password on lines 37 and 39

Make sure that you're connected to the right Port in the IDE, then upload the sketch.

Once it's done uploading, open the Serial Monitor to look for successful output messages (be patient when waiting for text to start showing up - the Cactus Micro is doing a lot!). Click here for an example of a successful stream to the hub.

The most important thing we're looking for is a line that says 6:HTTP/1.1 204 No Content. This means that the hub returned a success message.

Now go to Initial State and checkout your new bucket called Hub_Test! You should see something like this:

screen shot 2015-11-02 at 12 15 02 pm

<< Part 3: Connect to WiFi - Part 3: Send Sensor Data >>

Clone this wiki locally