Hi Guys.. I'm stuck with a data format issue.
I'm using an ESP8266 module to connect to my Phone Hotspot (My only internet) and read a UDP stream from the PS4. Its ProjectCars Telemetry im after..
I'm coding the ESP directly, planning to output the serial to a Teensy for manipulation later.. Presently, its just outputting to the serial mon, Bodged thru an UNO serial (FTDI cable in post)
I hacked 'ESP8266 Wifiscan' with standard 'WifiUDPsendrecievestring' and it appears i've connected to the stream, as i'm recieving packets of the correct size (1367), from the PS4's IP address.. :) Note- I changed the original packetBuffer size from 255 to 1367.!! Is that OK..?
But now I need help.. How to interpret the data..
From what ive managed to find out, peeps are using a 'Struct' to move this stream to, but i just cannot get my head around how to use this within Arduino.. I kinda get how the struct works, and the naming convention (structname.field1, etc) but I quickly get out of my depth, especially how to use it in the actual code..
I've added the latest data_struct.h, if only to see the layout, but adding it as an include (as suggested) errors, so its hashed out at the mo..
I found a German site with 'Arduino Dash' inc code. He's used 'String', which i've tried to utilise in my code, but it's just coming back empty (nothing matches).. His bit of code is commented as 'NEW Arduino Dash', and I hopefully just addeded it after the existing print 'Packetbuffer'
I've been at this for a week. I've read many a tutorial on C++, but just get more confused.. ( I used to be a COBOL mainframe programmer in a previous life, but now drive 44 ton trucks.. )
So.. Heres the Serial OP..
Received packet of size 1367 From 192.168.43.24, port 62761 Contents: Šx
Received packet of size 1367 From 192.168.43.24, port 62761 Contents: Š€
WITH the 'Arduino-dash' bit added...
Received packet of size 1367 From 192.168.43.24, port 62761 Contents: ŠŒ stringOne = ŠŒ converted values = vRpm = 0 vGear = 0 vSpeed = 0 vTemp = 0 vAbs = 0 vFuel = 0 vEngineState = 0 vLevel = 0 vTime = 0 vSplit = 0 LEDSTATE = 0
Bit hopeful just adding it to the end, but had to try...