This file contains 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
#include <Arduino.h> | |
#include <SoftwareSerial.h> | |
#include <WiFly.h> | |
#include "HTTPClient.h" | |
#define SSID "SEEED-MKT" | |
#define KEY "depot0510" | |
// WIFLY_AUTH_OPEN / WIFLY_AUTH_WPA1 / WIFLY_AUTH_WPA1_2 / WIFLY_AUTH_WPA2_PSK |
This file contains 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 script gets the Spark Core's ID and creates a Ubidots data source with name = SparkID, so it can be later recognized. | |
Depending on the application, this code may be extended to: | |
- Create variables within the data source and get its IDs to post data to them later: | |
- Use the function "get_id" to get the Ubidots ID inside an API response | |
- See "Create a variable within a Data source" http://ubidots.com/docs/api/v1_6/data/post_datasources_id_variables.html | |
- Add the code inside the loop() function to read sensor data, send it to Ubidots, etc. | |
This file contains 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
/* Chip McClelland - CC3000 Data Logger | |
BSD license, Please keep my name and credits in any redistribution | |
Requirements: | |
- Account on Ubidots. http://www.ubidots.com | |
- Sparkfun CC3000 Breakout Board - https://www.sparkfun.com/products/12072 | |
- I used a 3.3V 8MHz Sparkfun Pro Micro - https://www.sparkfun.com/products/12587 | |
Credits: | |
- Sparkfun Library and Example code from Shawn Hymel: https://github.com/sparkfun/SFE_CC3000_Library | |
- Ubidots Demo Code from: Mateo Velez for Ubidots,Inc. Modified 15 Nov 2014 |
This file contains 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 "dnsclient/dnsclient.h" | |
// This #include statement was automatically added by the Spark IDE. | |
#include "HttpClient/HttpClient.h" | |
HttpClient http; | |
#define VARIABLE_ID "544e4a8f7625426e332bxxxx" | |
#define TOKEN "pSZJt9W7v5W3fpUsxxxxiDMgJ770NK" | |
int people = 0; |
This file contains 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
#!/usr/bin/python | |
""" | |
Get number of REAL users from Hubspot API, then post this data to Ubidots | |
""" | |
__author__ = "Agustin Pelaez" | |
from sys import argv | |
import ubidots |
This file contains 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
#!usr/bin/env lua | |
-- Loading main configuration | |
local config = require "config" | |
-- Library to read command output | |
local io = require "io" | |
-- Load the http module | |
local http = require "socket.http" |
This file contains 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
local conf = { | |
variables = { | |
['52d481d9f91b284cd22af757'] = '8.8.8.8', | |
}, -- Add one variable id per each site to check the ping | |
token = '9xtbvHL8hFKxfkmlXUW3qNoUpOEZAtp0qkkwPqffbn6DiR3ElRJ4B5m1hZMs', --Replace with your own token | |
host = 'things.ubidots.com', -- Host to establish connection | |
port = '80', -- Port where service is listening | |
} | |
return conf |
This file contains 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
#include <Arduino.h> | |
#include <SoftwareSerial.h> | |
#include <WiFly.h> | |
#include "HTTPClient.h" | |
#define SSID "SEEED-MKT" | |
#define KEY "depot0510" | |
// WIFLY_AUTH_OPEN / WIFLY_AUTH_WPA1 / WIFLY_AUTH_WPA1_2 / WIFLY_AUTH_WPA2_PSK | |
#define AUTH WIFLY_AUTH_WPA2_PSK |
This file contains 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
#!/usr/bin/env python | |
import time # Library for delays | |
import RPi.GPIO as GPIO # Library for using the GPIO ports | |
from math import log1p,exp,log10 # Library for math functions. No need for it if you'll get the raw data from the sensors | |
from ubidots import ApiClient # Ubidots Library | |
import Adafruit_DHT # Library from Adafruit to simplify the use of DHT sensor. | |
# Set up the SPI interface pins. Through SPI we can connect to the ADC MCP3008 | |
SPICLK = 18 |
This file contains 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
#!/usr/bin/python | |
""" | |
Get number of RSVPs for #Iot Day and send them to Ubidots | |
""" | |
__author__ = "Agustin Pelaez" | |
from sys import argv | |
import ubidots |