Skip to content

Instantly share code, notes, and snippets.

@ubi-gists
ubi-gists / onboarding_dashboard.json
Last active February 27, 2024 23:19
A dashboard template for Ubidots onboarding
[
{
"__model__": "dashboard",
"label": "onboarding-wip2",
"name": "Demo Dashboard",
"description": "",
"tags": [],
"context": {
"size": {
"width": "1366",
[
{
"__model__": "dashboard",
"label": "ncd-ota",
"name": "NCD OTA",
"description": "",
"tags": [],
"context": {
"size": "auto",
"alignment": "center",
[
{
"id": "1e3ade0e.dd0622",
"type": "tab",
"label": "Data and Device Manager",
"disabled": false,
"info": ""
},
{
"id": "otaManager",
/*
* The sample code requires the ESP8266 v.2.0.0 library for proper operation.
* (https://github.com/ubidots/ubidots-esp8266/releases/tag/2.0.0)
* However, is strongly recommended to migrate the code to the latest library version.
* (https://github.com/ubidots/ubidots-esp8266)
*/
#include <Wire.h>
#include "UbidotsMicroESP8266.h"
/*
* The sample code requires the ESP8266 v.2.0.0 library for proper operation.
* (https://github.com/ubidots/ubidots-esp8266/releases/tag/2.0.0)
* However, is strongly recommended to migrate the code to the latest library version.
* (https://github.com/ubidots/ubidots-esp8266)
*/
#include "UbidotsMicroESP8266.h"
#include "DHT.h"
/*
* The sample code requires the ESP8266 v.2.0.0 library for proper operation.
* (https://github.com/ubidots/ubidots-esp8266/releases/tag/2.0.0)
* However, is strongly recommended to migrate the code to the latest library version.
* (https://github.com/ubidots/ubidots-esp8266)
*/
#include "UbidotsMicroESP8266.h"
#define ID "223e6b1176254235a7xxxxx" // Put here your Ubidots variable ID
#define TOKEN "bbN8FrVulRYGuPTkaaaiR9Myxxxxx" // Put here your Ubidots TOKEN
/*
* The sample code requires the ESP8266 v.2.0.0 library for proper operation.
* (https://github.com/ubidots/ubidots-esp8266/releases/tag/2.0.0)
* However, is strongly recommended to migrate the code to the latest library version.
* (https://github.com/ubidots/ubidots-esp8266)
*/
#include "DHT.h"
#include "UbidotsMicroESP8266.h"
/*
* The sample code requires the ESP8266 v.2.0.0 library for proper operation.
* (https://github.com/ubidots/ubidots-esp8266/releases/tag/2.0.0)
* However, is strongly recommended to migrate the code to the latest library version.
* (https://github.com/ubidots/ubidots-esp8266)
*/
#include "UbidotsMicroESP8266.h"
#define ID "Your_variable_ID_here" // Put here your Ubidots variable ID
#define TOKEN "Your_token_here" // Put here your Ubidots TOKEN
/****************************************
* Include Libraries
****************************************/
#include "UbidotsESPMQTT.h"
#include <Servo.h>
/****************************************
* Define Constants
****************************************/
#define TOKEN "assign_your_ubidots_token" // Your Ubidots TOKEN
/* Constants */
const request = require('request-promise');
const TOKEN = "PUT_YOUR_UBIDOTS_TOKEN_HERE"; // Assign your Ubidots TOKEN
/* Decodes the hex frame coming from the SigFox callback – Thinxtra device */
function decodeHexFrame(data) {
var buf = new Buffer.from(data, "hex");
var temperatura = buf.readInt16LE() / 100;