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 <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
const char* ssid = "wifi"; | |
const char* password = "clave"; | |
const char* mqtt_server = "mqtt_server"; | |
int devicePin = 2; | |
WiFiClient espClient; |
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
# | |
# Raspberry Pi System Stats | |
# Save temperature, cpu usage and others to ThingSpeak channel | |
# Check the article: https://www.gsampallo.com/blog/2019/10/20/estadisticas-de-sistemas-de-raspberry-pi/ | |
# | |
import subprocess | |
import json | |
import requests | |
p = subprocess.Popen(['iostat','-c','-o','JSON'], stdout=subprocess.PIPE,stderr=subprocess.PIPE) |
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
void loop() { | |
estado = digitalRead(sensor); //se lee el estado del sensor | |
Serial.print("Estado del sensor = "); | |
Serial.println(sensor); | |
//Vaciamos la pantalla | |
oled.crearDisplay(); | |
oled.setTextColor(WHITE); | |
oled.setCursor(0,0); | |
oled.setTextSize(2); |
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 <ESP8266WiFi.h> | |
const char* ssid = "NOMBRE_RED"; | |
const char* password = "PASSWORD_RED"; | |
void setup() { | |
Serial.begin(115200); | |
WiFi.begin(ssid,password); |
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 <ESP8266WiFi.h> | |
const char* ssid = "NOMBRE_RED"; | |
const char* password = "PASSWORD_RED"; | |
WiFiServer servidor(80); | |
void setup() { | |
Serial.begin(115200); |
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 <ESP8266WiFi.h> | |
const char* ssid = "SSID_NETWORK"; | |
const char* password = "PASSWORD_NETWORK"; | |
WiFiServer servidor(80); | |
int pinLed1 = 5; //D1 | |
void setup() { |
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 <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
//Reemplace por los datos de la red iot | |
const char* ssid = "Nombre_red"; | |
const char* password = "Clave_red"; | |
const char* mqtt_server = "Servidor_MQTT"; | |
WiFiClient espClient; |
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 <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
//Reemplace por los datos de la red iot | |
const char* ssid = "Nombre_red"; | |
const char* password = "password"; | |
const char* mqtt_server = "mqtt_server"; | |
WiFiClient espClient; |
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
/* | |
* Send Push notification from NodeMCU with Pushbullet API | |
* https://www.gsampallo.com/2020/07/09/envio-de-notificaciones-desde-nodemcu-con-pushbullet/ | |
* Guillermo Sampallo 2020 | |
*/ | |
#include <ESP8266WiFi.h> | |
const char* ssid = "SSD_NETWORK"; | |
const char* password = "PASSWORD_NETWORK"; |
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
/* | |
* How to use a digital potenciometer with Arduino | |
* Link to article: https://www.gsampallo.com/?p=952 | |
*/ | |
#include <SPI.h> | |
byte address = 0x00; | |
int CS = 10; | |
void setup() { |
OlderNewer