is showing its claws in Photo 5. The
FT311 GPIO board can be used with
the USB host evaluation kit, as well
as the Vinco. When coupled to this
kit, the FT311 GPIO board’s 300 mA
LDO voltage regulator is powered
from the same wall wart that supplies
the + 5 VDC to the kit.
An Android demo program is
available on the FTDI site that
interfaces directly with the FT311
GPIO board’s pushbuttons and LEDs.
However, running the Android GPIO
demo program isn’t as much fun as
seeing your home-grown Android
app blink those LEDs.
FT311D ANDROID APP
Our FT311D Android application
begins in this manner:
■ PHOTO 4. Like everything from FTDI, the FT311D supporting
component layout is nice and clean.
Dim i As Int
Dim manager As UsbManager
Dim packetOut(4) As Byte
Dim outFT311 As
Dim inFT311 As InputStream
Dim FT311Acc() As
With the exception of the “i”
variable and the packetOut array, the
rest of the declarations are spawning
instances of objects. The referenced
USB objects are realized in
Basic4android’s USB library.
Basic4android is a rapid application
development environment aimed
solely at the development of Android
If you’ve delved into classic
Android programming, you know that
Android application development is
based on Java and the Android SDK.
Basic4android uses the same
aforementioned resources to
produce native Android APK files that
do not require any runtime
In that Basic4android is a
combined IDE/compiler, it eliminates
the need for an external IDE such as
Eclipse. The Dim declarations suggest
that programming with Basic4android
is very similar to programming a
Visual Basic application. In fact,
■ PHOTO 5. Are these enough pushbuttons and LEDs for you?
Plus, they come with their very own power supply.
Basic4android looks very much like
For those of you that are Visual
Basic programmers, your
Basic4android learning curve has
been shortened considerably.
Let’s get back to the
Basic4android code. We will use a
Samsung Galaxy Tab to communicate
with our FT311D accessory. At a
minimum, we’ll need to wake up the
OutputStream, and UsbAccessory
objects. The UsbManager object
provides access to the connected
USB devices. USB class constants are