Skip to content

Instantly share code, notes, and snippets.

View m2mIO-gister's full-sized avatar

Github User m2mIO-gister

View GitHub Profile
@m2mIO-gister
m2mIO-gister / m2mioClient.ino
Last active January 6, 2018 00:55
Arduino Client for the m2m.io platform. Handles provisioning an Arduino device to a user's account as well as publishing sensor values to the cloud platform.
#include <SPI.h>
#include <PubSubClient.h>
#include <Ethernet.h>
/*
* m2m.io Client App
*
* Client application for m2m.io M2M platform.
*
* Client handles provioning as well as provides a template
#!/bin/bash
# TODO: Add arg to get path
path_to_new_dse_dir=/Users/franklovecchio/Desktop/development/dse
handle_args() {
}
# $1: path
#!/bin/bash
# Find a value in simple JSON object from a key
# $1: key to find
# $2: JSON
find() {
for i in $(echo $2 | tr "," "\n"); do
i=`echo $i | sed "s/{//g" | sed "s/}//g" | sed "s/\"//g"`
set=($(echo $i | tr ":" "\n"))
if [ "$1" == "${set[0]}" ]; then