- Home /
Arduino for Unity Output
Hello there!
I often find how an arduino could be used as input to control unity via serial communication. This mostly sends a character over Serialport which will be handled by the arduino sketch (for instance like in this example: http://r3dstar.co.uk/?p=211) Is it somehow possible to pass the arduino some integer values which are calculated in unity instead of characters in the case I want to control an actuator? Maybe someone got an idea for me. Note that I unfortunately can´t use the Uniduino plugin (which is pretty awesome actually) because I need to use some external arduino libraries. Thanks in advance!
Answer by hsmoon5458 · Jan 21, 2021 at 08:04 PM
If you are using serial communication, the most of the data is received as string.
You can simply convert the string to whatever data type you want with Unity functions.
I assume this video will help.