This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*------------------------------------------------------------------------- | |
| Spark Core and Photon library to control WS2811/WS2812 based RGB | |
| LED devices such as Adafruit NeoPixel strips. | |
| Currently handles 800 KHz and 400kHz bitstream on Spark Core and Photon, | |
| WS2812, WS2812B and WS2811. | |
| Also supports: | |
| - Radio Shack Tri-Color Strip with TM1803 controller 400kHz bitstream. | |
| - TM1829 pixels | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This #include statement was automatically added by the Particle IDE. | |
| #include "AzureMobileService/AzureMobileService.h" | |
| // This #include statement was automatically added by the Particle IDE. | |
| #include "SparkFun_Photon_Weather_Shield_Library/SparkFun_Photon_Weather_Shield_Library.h" | |
| //Azure Mobile Service Configuration | |
| #define MYSERVICE "soilmonitor" | |
| #define MYKEY "FINDTHISKEYINAZUREPORTAL" | |
| AzureMobileService ams; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This #include statement was automatically added by the Spark IDE. | |
| #include "HTU21D/HTU21D.h" | |
| HTU21D htu = HTU21D(); | |
| char Org[] = "ORGANIZATION_NAME"; | |
| char Disp[] = "DISPLAYNAME"; | |
| char Locn[] = "LOCATION"; | |
| void setup() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "event": "ConnectTheDots", | |
| "url": "https://connectthedotsex-ns.servicebus.windows.net/ehdevices/messages", | |
| "requestType": "POST", | |
| "json": { | |
| "subject": "{{s}}", | |
| "unitofmeasure": "{{u}}", | |
| "measurename": "{{m}}", | |
| "value": "{{v}}", | |
| "organization": "{{o}}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "event": "NAME_OF_YOUR_EVENT", | |
| "url": "EVENT_HUB_URL", | |
| "requestType": "POST", | |
| "json": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "event": "ConnectTheDots", | |
| "url": "https://YOUR_EVENT_HUB_NAME-ns.servicebus.windows.net/ehdevices/messages", | |
| "requestType": "POST", | |
| "json": { | |
| "subject": "{{s}}", | |
| "unitofmeasure": "{{u}}", | |
| "measurename": "{{m}}", | |
| "value": "{{v}}", | |
| "organization": "{{o}}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var https = require('https'); | |
| var crypto = require('crypto'); | |
| var moment = require('moment'); | |
| exports.post = function(request, response) { | |
| sendTemperature(JSON.stringify(request.body)); | |
| console.log(request.body); | |
| response.send(statusCodes.OK); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int frequencyInHz = 51; | |
| int led = 13; | |
| float restTime = (1/frequencyInHz) * 1000;; | |
| void setup() { | |
| // put your setup code here, to run once: | |
| pinMode(led, OUTPUT); // Configure the pin for OUTPUT so you can turn on the LED | |
| tone(8, frequencyInHz); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz --no-check-certificate | |
| tar -xvzf setuptools-0.6c11.tar.gz | |
| cd setuptools-0.6c11 | |
| easy_install ino | |
| cd .. | |
| wget https://github.com/amperka/ino/archive/master.zip --no-check-certificate | |
| unzip master.zip | |
| cd ino-master | |
| make install PREFIX=/usr | |
| cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| opkg install openssl-dev openssl | |
| wget http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz | |
| tar -xvzf cmake-3.1.0.tar.gz | |
| cd cmake-3.1.0 | |
| ./bootsrap | |
| make | |
| make install | |
| cd .. | |
| wget http://softlayer-dal.dl.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz | |
| tar -xvzf libuuid-1.0.3.tar.gz |