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
#!/usr/bin/env python | |
from geopy.geocoders import Nominatim | |
import sys | |
import json | |
def main(): | |
geolocator = Nominatim() | |
params = json.loads(sys.argv[1]) | |
location = geolocator.reverse((params['lat'],params['lng'])) |
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
#include <LWiFi.h> | |
#include <LWiFiClient.h> | |
#include <PubSubClient.h> | |
// These are the variables you will want to change based on your IOT data streaming account / provider | |
#define TOPIC "/v1.6/devices/YOUR-DEVICE-LABEL" | |
#define TOKEN "YOUR-UBIDOTS-TOKEN | |
#define WIFI_AP "UBIWIFI" | |
#define WIFI_PASSWORD "clave123456789ubi" |
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
// MQTT-Ubidots example using Grove Temperature Sensor v1.2 in A0 and Grove Relay on D6 (pin 12) | |
#include <PubSubClient.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WiFiMulti.h> | |
#define WIFISSID "wifi-ssid" | |
#define PASSWORD "IOT2016" | |
#define TOPIC1 "/v1.6/devices/motor/relay/lv" | |
#define TOPIC2 "/v1.6/devices/motor/temp" |
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
/* | |
Web client | |
This sketch connects to a website through GPRS on LinkIt platform. | |
Specifically, | |
this example downloads the URL "http://arduino.cc/asciilogo.txt" and | |
prints it to the Serial monitor. | |
created 8 Mar 2012 | |
by Tom Igoe |
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
#include <Wprogram.h> | |
#include <Wire.h> | |
#include <WiFiShieldOrPmodWiFi_G.h> | |
#include <DNETcK.h> | |
#include <DWIFIcK.h> | |
#include <LedControl.h> | |
//------------------------------End Libraries---------------------------------- | |
#define GREEN 0 | |
#define RED 1 |
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
/* | |
Ubidots WiFi client | |
This sketch reads analog inputs and sends the values to Ubidots | |
Change the macro WIFI_AP, WIFI_PASSWORD, WIFI_AUTH, URL, TOKEN and VARIABLE_ID accordingly. | |
based on the Web Client example created 13 July 2010 | |
by dlf (Metodo2 srl) | |
modified 31 May 2012 |
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 is an example for the DFRobot Wido - Wifi Integrated IoT lite sensor and control node | |
* Product Page & More info: http://www.dfrobot.com/index.php?route=product/product&product_id=1159 | |
* Designed specifically to work with the DFRobot Wido products: | |
* | |
* The library is forked from Adafruit | |
* | |
* Contributed by James | |
* BSD license, all text above must be included in any redistribution | |
* Modified by Agustin Pelaez for Ubidots, Inc. |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<Driver xmlns="http://code.google.com/p/open-zwave/" version="3" home_id="0x0184e19a" node_id="1" api_capabilities="8" controller_capabilities="8" poll_interval="30000" poll_interval_between="false"> | |
<Node id="1" name="Hello name" location="Hello location" basic="2" generic="2" specific="1" type="Static PC Controller" listening="true" frequentListening="false" beaming="true" routing="false" max_baud_rate="40000" version="3" query_stage="Complete"> | |
<Manufacturer id="0086" name="Aeon Labs"> | |
<Product type="0002" id="0001" name="Z-Stick S2" /> | |
</Manufacturer> | |
<CommandClasses> | |
<CommandClass id="32" name="COMMAND_CLASS_BASIC" version="1" after_mark="true"> | |
<Instance index="1" /> | |
<Value type="byte" genre="basic" instance="1" index="0" label="Basic" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" /> |
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 is an example for the Adafruit CC3000 Wifi Breakout & Shield | |
Designed specifically to work with the Adafruit WiFi products: | |
----> https://www.adafruit.com/products/1469 | |
Adafruit invests time and resources providing this open source code, | |
please support Adafruit and open-source hardware by purchasing | |
products from Adafruit! |
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
#!/usr/bin/env python | |
import logging | |
import ubidots | |
import sys, os | |
logging.basicConfig(level=logging.INFO) | |
logger = logging.getLogger('openzwave') |
NewerOlder