The Unity interface works on recent versions of Windows and MacOS.
Watch the UNITY-INTERFACE Demo Video for an overview of hardware setup and interface information.
Electronics in this demo include an LED and a battery, plus MP System with analog I/O and digital I/O on the other side.
This module can drive some BIOPAC Systems external devices, such as input and outputs, both analog and digital.
It works on all recent version of Unity (5.5+). Start AcqKnowledge with a small setup of digital and analog I/O you can find in the samples folder.
Make sure the network connection is activated in AcqKnowledge with NDT (Network Data Transfer license).
Launch Visual Studio and connect to Unity for some scripting.
Start by creating a new element in Unity and add a component for the connection, the Connector Component.
You can use “Autodiscover server” or put the IP address and port manually.
Start the scene in Unity to confirm that the connection is active; you will see that “connected” is checked and you can read the unity type, but you are not acquiring yet.
Start the acquisition in AcqKnowledge, the checkbox is ON in Unity.
Some quick samples of the asset usage:
- Create a small script with buttons to start, stop, or toggle the acquisition from within Unity; use the connector Component.
- Now some marker events: Again, we will write a few line of script using GenericEventSender and its “InsertGlobalEvent” function. The script can be configured with default arguments set from the Unity Inspector, or use some custom values directly set from script. Here for example, we can trigger the rock fall, and send an event at the same time. You can also send other event with script-defined values.
- For Analog & Digital inputs, use InputChannel component, with the GetValueOrDefault function. The channels are preconfigured in the Unity inspector window. Here you can see that it will read the voltage of the battery, and detect the button press. For example here, I have 3.2 V from the battery… and also the DIGITAL value goes from 0 to 5 V… 0 to 5 V again…
- For Outputs, use OutputChannel component to set some data from the script, here for example, we will generate a Sine curve to send some data to AcqKnowledge. Here again, the Unity inspector will be used to configure the Output channel number. When we press “play”, we can see the sine function, and the LED indicator
- For Digital Output, this is the same with boolean values. here with a GUI button, I can toggle the output, I can see it on the AcqKnowledge graph and the LED goes off, on, off again.