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 Particle IDE. | |
#include <Ubidots.h> | |
// This #include statement was automatically added by the Particle IDE. | |
#include <Current_Monitor.h> | |
#ifndef TOKEN | |
#define TOKEN "put_your_ubidots_token_here" // Put here your Ubidots TOKEN | |
#endif |
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 Libraries | |
****************************************/ | |
#include "UbidotsESPMQTT.h" | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
/**************************************** | |
* Define Constants | |
****************************************/ | |
#define TOKEN "....." // Your Ubidots TOKEN |
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 example get the last value of a variable from the Ubidots Cloud(www.ubidots.com) to control | |
* a Led. | |
* | |
* Requirements: | |
* 1. In the Device section, create a new device called "control" | |
* 2. Into the device just created, create a new default variable called "led" | |
* 3. In the Dashboard section, create a new "switch" control widget to control the led :) | |
* | |
* IMPORTANT NOTE: Don't forget assign your WiFi credentials, ubidots token, and the pin where the |
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 Example sends harcoded data to Ubidots using a ESP32. The code sends a distance value | |
* between a device and its opposite endpoint to Ubidots, then the value will be managed in | |
* Ubidots to calculate the volume of a tank with the characteristics of your tank. | |
* | |
* This example is given AS IT IS without any warranty. | |
* | |
* Made by María Carlina Hernandez. | |
*************************************************************************************************/ |
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 Libraries | |
****************************************/ | |
#include <PubSubClient.h> | |
#include <SPI.h> | |
#include <WiFi.h> | |
/**************************************** | |
* Define Your Wi-Fi crendetials | |
****************************************/ |
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
// https://ubidots.com/docs/api/index.html | |
export default (request) => { | |
const xhr = require('xhr'); | |
const queryStringCodec = require('codec/query_string'); | |
const token = request.message.token || ''; | |
const apiKey = request.message.apiKey || ''; | |
const action = request.message.action; | |
const payload = request.message.payload; | |
const labelDevice = request.message.labelDevice; | |
const variableLabel = request.message.variableLabel; |
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 code is to control the servo of the | |
* Pet Automaic Dispenser | |
* nodeMCU pins: | |
* 3v3 --> Red wire of the servo | |
* GND --> Black wire of the servo | |
* 5(D1)--> Yellow o white wire of the servo | |
* Created 28 Octubre 2016 | |
* by María Hernandez | |
* Public code. |
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
// Made by: Maria Carlina Hernandez | |
/**************************************** | |
* Include Libraries | |
****************************************/ | |
#include "UbidotsESPMQTT.h" | |
/**************************************** | |
* Define Constants | |
****************************************/ | |
#define TOKEN "..." // Your Ubidots TOKEN | |
#define WIFINAME "..." //Your SSID |
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 Libraries | |
****************************************/ | |
#include "UbidotsESPMQTT.h" | |
/**************************************** | |
* Define Constants | |
****************************************/ | |
#define TOKEN "...." // Your Ubidots TOKEN | |
#define WIFINAME "...." //Your SSID |
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 Libraries | |
****************************************/ | |
#include "UbidotsESPMQTT.h" | |
#include <map> | |
/**************************************** | |
* Define Constants | |
****************************************/ | |
#define TOKEN "..." // Your Ubidots TOKEN |