Page 1 of 8 123 ... LastLast
Results 1 to 10 of 73

Thread: How to import data from wifi into arduino?

  1. #1
    Superkart Pilot memoric77's Avatar
    Join Date
    May 2015
    Location
    Bochum, Germany
    Posts
    159
    Platform
    PC

    Lightbulb How to import data from wifi into arduino?

    Hi Community,

    I want to use the incoming UDP-data over WIFI via the ESP8266 Modul to use it for my WIP ButtbonBoxV3. Who knows and want to share how it could work? We could use it to turn a indicator on/off if a car is beside us, control a stepper motor for analog rpm display, turn on led for different race flags, display gear oder rmp for example.

    IŽam new in Arduino and C+ and never used the ESP8266 Modul, but it couldŽnt be so hard to do and maybe a clever guy could write up the Sketch within a minute . IMHO it has to be the same like reading the UDP data into an App like actually PCars Dash or CrewChief, but in this case via Arduino: "If serial data from UDP wifi is "blue flag" -> turn on blue led" ...

    Who wants to be the first to answer??
    Put the pedal to the metal
    PSN/Steam/etc. ID: memoric77 | http://www.virtualracing.org/
    PS4 | SAMSUNG 55" UE55F6500 & Oculus Rift CV1 | Playseat Challenge + DIY Bodyshaker, ButtonboxV3 https://www.youtube.com/watch?v=A79LLmI4IBY|
    FANATEC CSP V2 + CSP V2 PEDAL + TM TH8A SHIFTER

  2. #2
    WMD Member MikeyTT's Avatar
    Join Date
    Jul 2012
    Location
    Crewe, UK
    Posts
    819
    Platform
    PC
    Continued from vrHive thread: Doing a quick google yields a few examples with the ESP8266. Looks fairly similar to the C# way. Just remember there are 3 packet types with different lengths. So I don't see getting the data being the issue. I also don't think the struct side of things to then decompile the byte array into something you can work with, should be that terrifying. Looks like structs in Arduino are closer to the Windows C++ counterparts (as you may expect I guess). Or if you only want specific info, then just walk up the byte array until you get to the bits you're after.

    Failing that you could use vrHive as an intermediary and let that do the heavy lifting with the UDP stream and then connect the Arduino via serial and consume the serial stream from vrHive, which is formatted in a much simpler manner. But that's not really what you asked

    Client/Server example for the ESP8266 (looks like you may have to login tho)
    Processor: Intel i7-4790 @ 3.6GHz Mainboard: Asus Maximus VI Memory: 32GB DDR3 Videocard: MSI 980ti Motherboard Sound/Headphones: Creative SB Z + M/B Sound for SimVibe / Onkyo 5.1 Surround + Astro A50 Headphones Monitors: 3 x Asus 27" VN279H PSU: OCZ ZX1250W Keyboard+Mouse: Corsair Gaming K70 RBG / Logitech G700 Mouse Gamepad/Wheel: Fanatec CSWv2 + BMW Rim, Fanatex CSPv2, Fanatec CS Shifter SQ v1.5 OS: Win7 Ult x64 Storage: 256GB SSD + 3TB HDD
    Resolution: 5040x1080@60Hz Texture Res: High Texture Filter: 4x V-Sync: No AA: MSAA4x FXAA & SMAA: Off Reflections: Low Vehicle Detail: Ultra World Detail: High Shadow Detail: Low Motion Blur: None
    My vrHive Telemetry and Dash App (PC/PS4/XB1) - Forum Page: http://forum.projectcarsgame.com/sho...nt-Server-more
    My vrHive Telemetry and Dash App (PC/PS4/XB1) - Web Site: www.vrhive.co.uk
    My YouTube Channel: http://www.youtube.com/user/TR7V8Mike?feature=mhee
    My Twitch Channel: http://www.twitch.tv/mikeytt

  3. #3
    Superkart Pilot memoric77's Avatar
    Join Date
    May 2015
    Location
    Bochum, Germany
    Posts
    159
    Platform
    PC
    Quote Originally Posted by MikeyTT View Post
    Continued from vrHive thread: Doing a quick google yields a few examples with the ESP8266. Looks fairly similar to the C# way. Just remember there are 3 packet types with different lengths. So I don't see getting the data being the issue. I also don't think the struct side of things to then decompile the byte array into something you can work with, should be that terrifying. Looks like structs in Arduino are closer to the Windows C++ counterparts (as you may expect I guess). Or if you only want specific info, then just walk up the byte array until you get to the bits you're after.

    Failing that you could use vrHive as an intermediary and let that do the heavy lifting with the UDP stream and then connect the Arduino via serial and consume the serial stream from vrHive, which is formatted in a much simpler manner. But that's not really what you asked

    Client/Server example for the ESP8266 (looks like you may have to login tho)
    Thank you

    Using the vrHive Data seems to be a good way, maybe I will try it. Maybe the easiest way. But the Box should be acting alone and it has to be connected with the PS4 as a native Keyboard. So the USB Port is already busy. Or I have to use a second one to connect too vrHive. Have to look into it .
    Put the pedal to the metal
    PSN/Steam/etc. ID: memoric77 | http://www.virtualracing.org/
    PS4 | SAMSUNG 55" UE55F6500 & Oculus Rift CV1 | Playseat Challenge + DIY Bodyshaker, ButtonboxV3 https://www.youtube.com/watch?v=A79LLmI4IBY|
    FANATEC CSP V2 + CSP V2 PEDAL + TM TH8A SHIFTER

  4. #4
    Superkart Pilot GForce's Avatar
    Join Date
    Jun 2015
    Location
    @Home :-)
    Posts
    559
    Platform
    PS4
    Not too much I can help here at the moment, but good Idea Memoric, I will def. follow this thread.

    Cu
    GForce
    PCars on PS4 with G29 Wheel, G27 Shifter and a DIY Bluetooth Botton Box on a Playseat Evo Top Gear edition

    Playseat Challenge for Sale - Shipping within Germany, France, Switzerland possible -> PM me if interested!

  5. #5
    Superkart Pilot memoric77's Avatar
    Join Date
    May 2015
    Location
    Bochum, Germany
    Posts
    159
    Platform
    PC
    Put the pedal to the metal
    PSN/Steam/etc. ID: memoric77 | http://www.virtualracing.org/
    PS4 | SAMSUNG 55" UE55F6500 & Oculus Rift CV1 | Playseat Challenge + DIY Bodyshaker, ButtonboxV3 https://www.youtube.com/watch?v=A79LLmI4IBY|
    FANATEC CSP V2 + CSP V2 PEDAL + TM TH8A SHIFTER

  6. #6
    WMD Member MikeyTT's Avatar
    Join Date
    Jul 2012
    Location
    Crewe, UK
    Posts
    819
    Platform
    PC
    Quote Originally Posted by memoric77 View Post
    ...But the Box should be acting alone and it has to be connected with the PS4 as a native Keyboard...
    That probably precludes the use of vrHive then, as it needs to communicate over serial with the Arduino. So maybe not simpler, but the original thought of keeping it all under one roof and code just in the Arduino is probably better.

    With that said I did buy an Ardunio Leonardo a while back to see if I could get that to work as a HID device in Windows and still receive serial traffic from my app, so that may be an option, tho that might be over the same connection. I don't know enough about PS4 button boxes TBH to really comment
    Processor: Intel i7-4790 @ 3.6GHz Mainboard: Asus Maximus VI Memory: 32GB DDR3 Videocard: MSI 980ti Motherboard Sound/Headphones: Creative SB Z + M/B Sound for SimVibe / Onkyo 5.1 Surround + Astro A50 Headphones Monitors: 3 x Asus 27" VN279H PSU: OCZ ZX1250W Keyboard+Mouse: Corsair Gaming K70 RBG / Logitech G700 Mouse Gamepad/Wheel: Fanatec CSWv2 + BMW Rim, Fanatex CSPv2, Fanatec CS Shifter SQ v1.5 OS: Win7 Ult x64 Storage: 256GB SSD + 3TB HDD
    Resolution: 5040x1080@60Hz Texture Res: High Texture Filter: 4x V-Sync: No AA: MSAA4x FXAA & SMAA: Off Reflections: Low Vehicle Detail: Ultra World Detail: High Shadow Detail: Low Motion Blur: None
    My vrHive Telemetry and Dash App (PC/PS4/XB1) - Forum Page: http://forum.projectcarsgame.com/sho...nt-Server-more
    My vrHive Telemetry and Dash App (PC/PS4/XB1) - Web Site: www.vrhive.co.uk
    My YouTube Channel: http://www.youtube.com/user/TR7V8Mike?feature=mhee
    My Twitch Channel: http://www.twitch.tv/mikeytt

  7. #7
    Superkart Pilot memoric77's Avatar
    Join Date
    May 2015
    Location
    Bochum, Germany
    Posts
    159
    Platform
    PC
    Quote Originally Posted by MikeyTT View Post
    That probably precludes the use of vrHive then, as it needs to communicate over serial with the Arduino. So maybe not simpler, but the original thought of keeping it all under one roof and code just in the Arduino is probably better.

    With that said I did buy an Ardunio Leonardo a while back to see if I could get that to work as a HID device in Windows and still receive serial traffic from my app, so that may be an option, tho that might be over the same connection. I don't know enough about PS4 button boxes TBH to really comment
    I've go to bed, but will answer you tommorow, ahm later and make a draw of what I need. Have a look into my Signatur for the Buttonbox. Just a HID Device/Leonardo to map the ingame buttons for the right feeling . But it would be cool to get some Input via UDP to let the ABS TCS LED blink, blink when an opponent is right beside you or, if I would be a brain in C+, display informations on a LCD or use a analog RPM display (dont know the english word). It's imho a mix of digital and analog technic . Do you copy that? Over and out
    Put the pedal to the metal
    PSN/Steam/etc. ID: memoric77 | http://www.virtualracing.org/
    PS4 | SAMSUNG 55" UE55F6500 & Oculus Rift CV1 | Playseat Challenge + DIY Bodyshaker, ButtonboxV3 https://www.youtube.com/watch?v=A79LLmI4IBY|
    FANATEC CSP V2 + CSP V2 PEDAL + TM TH8A SHIFTER
    The following user likes this Post: GForce


  8. #8
    GT5 Pilot
    Join Date
    Sep 2015
    Location
    Florida
    Posts
    1,183
    Platform
    PS4
    It looks like the standard Arduino libs support reading UDP over ethernet:

    https://www.arduino.cc/en/Reference/EthernetUDPRead

    The UDP stream is pretty straight forward. It's a stream of null bytes with the payload arriving with a 3-byte header, composed of the build number (2-bytes) and packet type (1-byte). Read in chunks, grab the headers and dispatch to a parser that unpacks the payload. No need for vrHive.
    The following user likes this Post: memoric77


  9. #9
    Superkart Pilot memoric77's Avatar
    Join Date
    May 2015
    Location
    Bochum, Germany
    Posts
    159
    Platform
    PC
    I didnt get it. Tried it one evening to use the ESP8266 with a leonardo, but imho its to complicated for a arduino/c++ noob. Does nobody want the same? It would be cool to use a analog rpm etc. with the arduino. No one? Reeeeeaaally??
    Put the pedal to the metal
    PSN/Steam/etc. ID: memoric77 | http://www.virtualracing.org/
    PS4 | SAMSUNG 55" UE55F6500 & Oculus Rift CV1 | Playseat Challenge + DIY Bodyshaker, ButtonboxV3 https://www.youtube.com/watch?v=A79LLmI4IBY|
    FANATEC CSP V2 + CSP V2 PEDAL + TM TH8A SHIFTER
    The following user likes this Post: GForce


  10. #10
    Superkart Pilot GForce's Avatar
    Join Date
    Jun 2015
    Location
    @Home :-)
    Posts
    559
    Platform
    PS4
    Fully supporting this idea but not sure if I'm capable for such an c++ project!?

    Cu
    GForce
    PCars on PS4 with G29 Wheel, G27 Shifter and a DIY Bluetooth Botton Box on a Playseat Evo Top Gear edition

    Playseat Challenge for Sale - Shipping within Germany, France, Switzerland possible -> PM me if interested!

Similar Threads

  1. [PC/XB1/PS4] vrHive - Dashes/Telemetry/Live Data/Arduino/Client-Server/+more
    By MikeyTT in forum Third-Party Apps & API Discussion
    Replies: 761
    Last Post: 11-10-2019, 11:42
  2. Arduino Dashboard
    By saibot852 in forum General Discussion
    Replies: 219
    Last Post: 04-09-2017, 04:41
  3. Import 3D model in game?
    By choptider in forum PC - Technical Help & Support
    Replies: 4
    Last Post: 25-11-2015, 03:54
  4. Logic3 TopDrive GT racing wheel not detected (Wifi dongle)
    By markieg in forum PC - Technical Help & Support
    Replies: 0
    Last Post: 09-10-2015, 12:12
  5. calling all arduino nuts
    By brooksy in forum General Discussion
    Replies: 2
    Last Post: 25-05-2015, 09:35

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •