I am looking to pass a boolean variable from Magic Leap 2 in real time to an Arduino or other kind of development board. The only past post I found is this one from Jan 2023:
After reading this post and doing some research, here are a few questions:
Is using Android platform via Bluetooth the best way to go forward?
If this is your first time creating an Android Unity App that communicates with an Arduino, I recommend looking on GitHub and exploring online tutorials to create a standard Android app that implements this functionality. You can run standard Android apps on the Magic Leap as long as they do not require Google Play services and are compiled for the x86_64 platform.
This means you can build a standard Unity Android app and deploy it on the Magic Leap.
Regarding your post, yes, the Android Bluetooth API is the correct way to communicate with Bluetooth devices. The guide you linked outlines this feature, as we do not provide or limit Bluetooth connectivity.
Regarding the USB port, you can use the Android APIs as long as the driver for your device is supported. However, I personally find Bluetooth to be easier.
Since this is regarding a standard Android feature, we do not provide custom documentation or examples. However, I have forwarded your request to our Voice of Customer team.