Converting processing code to Android

edited April 2017 in Android Mode

Hello. I've written a code in processing that uses arduino inputs (more specifically a sensor that combines gyroscope and accelerometer). I would like to make this more portable so instead of my laptop screen I would be using an external one. I thought of an android tablet and discovered the android mode. The problem is that i'm using libraries like controlp5 and opengl which are not accepted in android mode. What are my best options here for modifying just a little of my code and get it working? is the android a viable solution? I know I'm being very vague but I hope some one had the same problem and more experience and can direct me to a nice solution. Thank you


  • Answer ✓

    ControlP5 works in android based on my experience. OpenGL is supported (fully?)

    If you need OpenGL, you should experiment. For your task however, you need to take some small steps.

    Have you programmed android before? Are you able to run a simple sketch in your phone? This implies you know how to setup Android mode and enable your phone into developer mode.

    You need to create a simple application that you can interact with your arduino. You can transfer mode in different modes so you need to specify which one you would prefer.

    Can you port processing code into Android. i will say no. But then again, I could come up with a simple example that will work. hwever, in android, you will need to take extra steps to make your app stable.

    Last thing... I know you want to use the gyro and acc from Arduino. However, every android comes with those sensors. I suggest you explore the Ketai library to see examples of what some sample applications look like. Visit and check the documentation and source codes or explore previous examples here in the forum, keyword ketai.


  • Thank you!

Sign In or Register to comment.