Create HMI in Unity

Hallo everyone,

I'm new here. I have a short question. I would like to create a HMI in Unity that shows me some data. Currently i have a Raspberry Pi (Python-Script) with different Sensors, I would like to display this sensor data live in the HMI. Is there a way to connect the Raspberry pi to unity?

Thanks a lot !

[quote=“beckerfr”, post:1, topic: 843765]
Is there a way to connect the Raspberry pi to unity?
Thanks a lot !
[/quote]

ethernet cable.

or (depending on the type of Pi it is)

turn it into a USB serial device (https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget?view=all)

if neither of those, then a better definition of ‘connect’ is required.


Ethernet, USB, Bluetooth. You can also plug a WIFI dongle into it, apparently.

Thank you very much. Can you give me a tip on how best to process the data in Unity? How can I display the data? Do I have to program this in C#? Please excuse my inexperience, is my first project in Unity

If you use network, you can use sockets.
You will need create communication protocol, between Pi an unity application.
You would need client-host link, to send messages.

You can make Pi as host, using python and then client using Unity.

Also you could use local server, with DB, which is closest thing to the OPC. Then pi and unity can communicate with server.

There is many ways of doing so. But if you can communicate with a sql server, for example using PHP, that would give you some flexibility. And you can easily store stae of your system. Also historical rending. But may be overcomplicated, depending on the project requirements.


There's no "the best way", you do it however you want.
You'll have to program this in C# on unity side. You can program it in whatever you want on raspberry pi side.

If you're going to use networking (ethernet or wifi), you'll be doing sockets programming, just how @Antypodish said.