Using Chirpers with Hologram. io

Using Chirpers with Hologram. io © MIT

Visually program IoT apps in the browser using an Arduino connected over cellular!

  • 2,491 views
  • 1 comment
  • 8 respects

Components and supplies

Apps and online services

About this project

What is Chirpers!?

Chirpers.com is a Node-RED based IoT platform. It runs the entire designer in the browser session (even if you are offline) and is specially developed for the web. It has nodes for web-bluetooth, web-usb, and web-midi. You can build full featured IoT applications and connect to other platforms and services.

Best part? Totally free! Just go to the website and sign up!

Hologram Network

Hologram.io is a cellular network provider perfect for makers. At $0.60 /mo plus $0.40 per mb, you'll have plenty of data for most IoT projects. You can get a free SIM card by going to hologram.io and then activate it at dashboard.hologram.io

Wiring

Most GSM modules like the SIM800L will have Power, Ground, RX, and TX. Although you can use certain other pins for SoftwareSerial, it is unstable. Use an Arduino that has extra onboard Serial pins.

For the Arduino Micro wire to Serial1.

If you end up using SoftwareSerial, set the baudrate to 57600, 38400, or 9600 (unstable)

Before inserting the SIM card make sure you are putting it in the right way.

Install TinyGSM and ArduinoHttpClient

  • Open the Arduino IDE
  • Go to Sketch > Include Library > Manage Libraries
  • Search for TinyGSM and ArduinoHttpClient and install them

Get DeviceID

  • Go to Devices > Your Device
  • Copy the deviceId from the top right corner and save it

Get API Key

  • Go to Account > API
  • Generate an API Key and save it

Program Sketch

  • Place your deviceId and api key in the sketch
// Hologram Credentials
String api_key = "";
String deviceid = ""; 

You can also change what data and tags you send, just alter the loop function

void loop() {
 // Connect Network
 connect_cellular();
 // Ready Data
 String data = String(analogRead(0));
 String tags = "arduino,hello_world";
 //Send to Hologram
 send_message(data, tags);
 //Disconnect GPRS and HTTP
 disconnect_networks();
 delay(120000); // Sleep for 2 minutes
}

Flash the sketch!

Verify Sketch Works

Open the Serial Monitor in the Arduino IDE and verify you see this around every 2 minutes

Connecting to hologram OK
Sending Message to Hologram
Disconnecting
Server disconnected
GPRS disconnected 

Setup Chirpers Flow

  • Copy/Paste the following flow into the designer
[{"id":"S2lXLB0HO4Q","type":"inject","z":"gknIlr1p9Ig","name":"Webhook In","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"allowDebugInput":false,"x":161,"y":168,"wires":[["VcX-MRM9DbA"]]},{"id":"VcX-MRM9DbA","type":"function","z":"gknIlr1p9Ig","name":"Parse Hologram Payload","func":"msg = JSON.parse(msg.payload.payload)\nvar data = atob(msg.data);\nmsg = {\"data\": data};\nreturn msg;","outputs":1,"noerr":0,"x":364,"y":168,"wires":[["v9g6gzGou38"]]},{"id":"v9g6gzGou38","type":"debug","z":"gknIlr1p9Ig","name":"","active":true,"console":"false","complete":"true","x":565,"y":168,"wires":[]}] 
  • Double click the inject node (the button) and copy the webhook URL (we'll need that in a sec)

Set Up Hologram Data Router

  • Create New Route

  • Pick some tags, in the example we use hello_world tag
  • Select "Custom Webhook URL" for the action. (Advanced wont work for this)
  • Paste in the Webhook URL from Chirpers
  • Save

Run The Chirpers Flow

  • Press the Play or Reload button to start the flow
  • Open the Debug tab

Success?!

About every two minutes you should see data come in on the debug tab!

Now you can program flows with data received over cellular!

Be sure to let us know about any projects you make with this by tweeting at @Hologram

Code

Example Flowsnippets
[{"id":"S2lXLB0HO4Q","type":"inject","z":"gknIlr1p9Ig","name":"Webhook In","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"allowDebugInput":false,"x":161,"y":168,"wires":[["VcX-MRM9DbA"]]},{"id":"VcX-MRM9DbA","type":"function","z":"gknIlr1p9Ig","name":"Parse Hologram Payload","func":"msg = JSON.parse(msg.payload.payload)\nvar data = atob(msg.data);\nmsg = {\"data\": data};\nreturn msg;","outputs":1,"noerr":0,"x":364,"y":168,"wires":[["v9g6gzGou38"]]},{"id":"v9g6gzGou38","type":"debug","z":"gknIlr1p9Ig","name":"","active":true,"console":"false","complete":"true","x":565,"y":168,"wires":[]}]

Comments

Similar projects you might like

Cellular IoT with Blynk & Hologram

by Moheeb Zara

  • 7,365 views
  • 11 comments
  • 25 respects

Use Losant on a Cellular Arduino

by Moheeb Zara

  • 2,141 views
  • 0 comments
  • 7 respects

Aggro-Crag-in-Real-Life-Button and Leader Board

Project tutorial by Sheena Martin and Derrick Wolbert

  • 1,971 views
  • 0 comments
  • 7 respects

SomfyDuino IO

Project tutorial by beejayf

  • 1,749 views
  • 1 comment
  • 1 respect
Add projectSign up / Login