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