I work on a project to control a motor via an app on android. Therefore I have already written an app in java to use an IOIO-Board to control the motor manually. Furthermore I want to use Simulink to read-out the acceleration sensor of the smartphone and convert this data into distance. So I can reach a specific position later. So far so good.
My problem is that I do not know how to use the ToApp-function from Simulink to send the data from a Simulink-app to my existing app. I do not know how to write the function in java to gather this data and the help in Simulink is not very helpful to me.
I use the Samsung Galaxy S5/Google Nexus 5 with Android 4.4.2/5.0, an IOIO-Board and MATLAB R2014a/Simulink and the Simulink support package for Samsung Galaxy Android Devices.
I hope someone can help me with my question.
Best regards, Max