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 <EEPROM_24LC32A_I2C.h> | |
EEPROM_24LC32A_I2C eprom = EEPROM_24LC32A_I2C(0x50); | |
void setup() { | |
Serial.begin(9600); | |
eprom.begin(); | |
//Escribe los datos en la eeprom en la direccion 0 |
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
#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> | |
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> | |
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 = "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
/* | |
* 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
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
/* | |
* Control de un motor paso a paso ( 28BYJ-48) con Attiny85 y L293D | |
* Esquemas y documentación aqui: https://www.gsampallo.com/blog/?p=624 | |
*/ | |
const int motorPin1 = 0; | |
const int motorPin2 = 1; | |
const int motorPin3 = 2; | |
const int motorPin4 = 4; | |
int motorSpeed = 1200; //variable para fijar la velocidad |
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) |