In a previous article we introduced the Pltouch, a brand new Android-based HMI with an additional set of I/O pins addressable directly from the Java source code.
In this post, we would like to explain the rationale behind the Android IO library that is provided free of charge in every Pltouch. This Android Java library acts as a bridge between the Android world and the low level I/O pins.
Once the library has been imported in an Eclipse workspace there are two ways in order to structure your app’s code. In both cases you have to
- Create an instance of the Android IO library
- Store this reference in the activity class (like for instance using private/public class field)
- Call the initialization method
Let’s go through every point and expand each one with examples.