estructura basica esp y libs
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
#include "Arduino.h"
|
#include <Arduino.h>
|
||||||
|
#include <WiFi.h>
|
||||||
|
#include <RESTClient.h>
|
||||||
|
#include <PubSubClient.h>
|
||||||
|
|
||||||
#define LED 2
|
#define LED 2
|
||||||
@@ -11,4 +11,9 @@
|
|||||||
[env:esp32dev]
|
[env:esp32dev]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
lib_deps =
|
||||||
|
knolleary/PubSubClient@^2.8
|
||||||
|
mikalhart/TinyGPSPlus@^1.0.2
|
||||||
|
bblanchon/ArduinoJson@^6.17.3
|
||||||
|
robbie-remote/RESTClient@^1.0.0
|
||||||
@@ -1,15 +1,18 @@
|
|||||||
#include "main.hpp"
|
#include "main.hpp"
|
||||||
|
|
||||||
|
const char* ssid = "SiempreHome";
|
||||||
|
const char* password = "d7?a35D9EnaPepXY?c!4";
|
||||||
|
const char* mqtt_server = "192.168.0.155";
|
||||||
|
|
||||||
|
WiFiClient espClient;
|
||||||
|
PubSubClient client(espClient);
|
||||||
|
long lastMsg = 0;
|
||||||
|
char msg[50];
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
|
||||||
void setup()
|
|
||||||
{
|
|
||||||
// Set pin mode
|
|
||||||
pinMode(LED, OUTPUT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop() {
|
||||||
{
|
|
||||||
delay(500);
|
|
||||||
digitalWrite(LED, HIGH);
|
|
||||||
delay(500);
|
|
||||||
digitalWrite(LED, LOW);
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user