Compare commits
2 Commits
router-udp
...
AP-udp
| Author | SHA256 | Date | |
|---|---|---|---|
| 9c9ff32f63 | |||
| 8ce167fa4c |
+278192
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
|
After Width: | Height: | Size: 238 KiB |
+6
-14
@@ -5,16 +5,10 @@
|
|||||||
#define MAX_PACKAGES 100
|
#define MAX_PACKAGES 100
|
||||||
#define TICKS 1000
|
#define TICKS 1000
|
||||||
|
|
||||||
const char* SSID="Tenda_32C850";
|
const char* SSID="ESP32-AP";
|
||||||
const char* PASSWD="rhLcrMEcY^Xjvq66";
|
const char* PASSWD="Tc8eX4v9TnXYQwsA";
|
||||||
// COnfigurar direcciones fijas
|
|
||||||
IPAddress local_ip(192,168,0,150);
|
|
||||||
IPAddress gateway(192,168,0,1);
|
|
||||||
IPAddress subnet(255,255,255,0);
|
|
||||||
IPAddress dns1(192,168,0,100);
|
|
||||||
IPAddress dns2(1,1,1,1);
|
|
||||||
|
|
||||||
IPAddress IP_C(192,168,0,134);
|
IPAddress IP_C(192,168,4,2);
|
||||||
#define PORT_C 8080
|
#define PORT_C 8080
|
||||||
NetworkUDP udp;
|
NetworkUDP udp;
|
||||||
|
|
||||||
@@ -34,10 +28,8 @@ void setup() {
|
|||||||
Serial.begin(230400);
|
Serial.begin(230400);
|
||||||
|
|
||||||
Network.begin();
|
Network.begin();
|
||||||
WiFi.STA.begin();
|
WiFi.AP.begin();
|
||||||
WiFi.STA.config(local_ip,gateway,subnet,dns1,dns2);
|
while (!WiFi.AP.create(SSID, PASSWD)) {
|
||||||
WiFi.STA.connect(SSID, PASSWD);
|
|
||||||
while (WiFi.STA.status() != WL_CONNECTED) {
|
|
||||||
delay(500);
|
delay(500);
|
||||||
Serial.print(".");
|
Serial.print(".");
|
||||||
}
|
}
|
||||||
@@ -46,7 +38,7 @@ void setup() {
|
|||||||
Serial.println("");
|
Serial.println("");
|
||||||
Serial.println("WiFi connected");
|
Serial.println("WiFi connected");
|
||||||
Serial.println("IP address: ");
|
Serial.println("IP address: ");
|
||||||
Serial.println(WiFi.localIP());
|
Serial.println(WiFi.AP.localIP());
|
||||||
|
|
||||||
// Iniciar y desbloquear la bandera
|
// Iniciar y desbloquear la bandera
|
||||||
timerSemaphore = xSemaphoreCreateBinary();
|
timerSemaphore = xSemaphoreCreateBinary();
|
||||||
|
|||||||
Reference in New Issue
Block a user