Browse Source

Fix libraries

esp32
ptrinchini 2 weeks ago
parent
commit
b779613fc0
  1. 3
      .vscode/extensions.json
  2. 7
      platformio.ini
  3. 14
      src/main.cpp

3
.vscode/extensions.json

@ -3,5 +3,8 @@
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}

7
platformio.ini

@ -8,9 +8,10 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
upload_protocol = esptool
lib_deps =

14
src/main.cpp

@ -1,13 +1,15 @@
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <WiFi.h>
#include <WebServer.h>
#include <PubSubClient.h>
#define WLAN_SSID "TP-LINK-RPT0"
#define WLAN_PASS "6JM54UG4EY"
#define WLAN_SSID "TP-LINK-HOME"
#define WLAN_PASS "6JM54UG4EX"
#define MQTT_CLID "ValveControl"
#define MQTT_HOST "192.168.1.133"
#define MQTT_HOST "192.168.1.146"
#define MQTT_PORT 1883
#define MQTT_USER "admin"
#define MQTT_PASS "22pa0799"
@ -33,7 +35,7 @@ int MotorPin1 = 0;
int MotorPin2 = 2;
int duration = 10000;
ESP8266WebServer server(80);
WebServer server(80);
WiFiClient espClient;
PubSubClient client(espClient);

Loading…
Cancel
Save