mirror of
https://github.com/adrigongv23/G26---Telemetry-Software.git
synced 2026-08-25 11:33:17 +02:00
Cambios para conexión con CPE
This commit is contained in:
parent
6100199e9c
commit
ec4742145f
2 changed files with 6 additions and 10 deletions
|
|
@ -8,10 +8,6 @@ CAN canController;
|
|||
// Objeto UDP para manejar la conexión UDP
|
||||
WiFiUDP udp;
|
||||
|
||||
//Configuración destino
|
||||
//Se debe de poner la IP del portatil trás conectar al Wifi del móvil
|
||||
const char* pc_ip = "192.168.43.155"; //Pongo una de prueba
|
||||
|
||||
//Envio de datos a través de UDP
|
||||
void TaskUdpSender(void *pvParameters){
|
||||
|
||||
|
|
@ -28,10 +24,10 @@ void TaskUdpSender(void *pvParameters){
|
|||
//Pasamos el dato actual a mensaje para enviarlo
|
||||
String mensaje = String(tempActual) + "|" + String(rpmActual) + "|" + String(battActual, 1);
|
||||
|
||||
//Enviamos el paquete a través de UDP
|
||||
udp.beginPacket(pc_ip, UDP_PORT);
|
||||
udp.print(mensaje);
|
||||
udp.endPacket();
|
||||
//Enviamos el paquete por broadcast a toda la red local (no hace falta conocer la IP del portátil)
|
||||
udp.beginPacket(IPAddress(255,255,255,255), UDP_PORT);
|
||||
udp.print(mensaje);
|
||||
udp.endPacket();
|
||||
|
||||
//Para comprobar que el paquete se está enviado correctamente podemos usar estos prints
|
||||
//Serial.print("UDP Enviado: ");
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
#include <WifiUdp.h>
|
||||
|
||||
//CONFIGURACIÓN WIFI Y FIREBASE
|
||||
#define WIFI_SSID "test"
|
||||
#define WIFI_PASSWORD "12345678"
|
||||
#define WIFI_SSID "FGades"
|
||||
#define WIFI_PASSWORD "GadesCPE"
|
||||
|
||||
//CONFIGURACIÓN WIFI Y FIREBASE
|
||||
#define UDP_PORT 4210
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue