Skip to content

Instantly share code, notes, and snippets.

View PharkMillups's full-sized avatar

Mark Phillips PharkMillups

  • Helium
  • Boston / San Francisco
View GitHub Profile
//Create Json object with buffer to match data size
StaticJsonBuffer<JSON_OBJECT_SIZE(2) + 35> jsonBuffer;
JsonObject & root = jsonBuffer.createObject();
root[F("interval")] = send_interval; //JSON MESSAGE
char buffer[HELIUM_MAX_DATA_SIZE];
size_t used = root.printTo(buffer, HELIUM_MAX_DATA_SIZE);
* Copyright 2017, Helium Systems, Inc.
* All Rights Reserved. See LICENCE.txt for license information
#include "Arduino.h"
#include "Board.h"
#include "Helium.h"
#include "HeliumUtil.h"
### Keybase proof
I hereby claim:
* I am pharkmillups on github.
* I am themarkphillips ( on keybase.
* I have a public key ASBYZtj0kDhPbhXLsGtT5BKb3qokovBx_WB0aTIae4AyzQo
To claim this, I am signing this object:

A Simple Helium API Challenge

Build a chart or two using the sensor data sources coming out of @pharkmillups' condo and Helium's beta HTTP API. The first five entries will be in line for some limited edition Helium swag.

Here are all the details you'll need:

  • Full API Docs:
  • Available Data Streams: udXeI0fPTnajUSfsgZz_Fg & NEr1iiOKRlqWS7EBS6l8Qw
  • API Token: f4rcAI9eEhLOPNu+WQmN25r5tARvvD2+b2LxIyi0o3Q=
PharkMillups /
Created July 29, 2013 22:51
Riaks Counters vis PBC API
// Counter update request
message RpbCounterUpdateReq {
required bytes bucket = 1;
required bytes key = 2;
required sint64 amount = 3;
optional uint32 w = 4;
optional uint32 dw = 5;
optional uint32 pw = 6;
optional bool returnvalue = 7;
// Create a new bucket in Riak and enable `allow_mult`
$ curl -i http://localhost:8098/buckets/new_hotness/props \
-X PUT -d '{"props":{"allow_mult":true}}' -H "Content-Type: application/json"
// POST to the `counters` resource. In this example we're adding "1" to the "riak-counters-blog-post-views" counter
$ curl -i http://localhost:8098/buckets/new_hotness/counters/riak-counters-blog-post-views \
-X POST -d "1"
PharkMillups / gist:5630223
Last active December 17, 2015 15:18
Crispy Tailors in San Francisco
db.getBucket('airlines', function(err, properties) {

});'airlines', {id: 'Lufthansa', country: 'DE'});'airlines', 'country:DE');

var db = require('riak-js').getClient();