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
/* | |
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
// 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
#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
#!/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'])) |
OlderNewer