Working with GPIO on the Wandboard and Writing an Android Driver for GPIO Interrupts

Following up on the last post “How to get started with Embedded Android on the Wandboard”, this article shows how to use the GPIO Pins of the Wandboard. It is based on the Android setup, however the generic part should run under other Linux based systems as well.

Finding the right GPIO Pin Number

In the userspace you are able to access GPIO functionality through the sysclass interface.

root@android:/ # ll /sys/class/gpio/                                           
--w------- root     root         4096 2013-06-20 10:57 export
lrwxrwxrwx root     root              2013-06-20 10:57 gpio101 -> ../../devices/virtual/gpio/gpio101
lrwxrwxrwx root     root              2013-06-20 10:57 gpio200 -> ../../devices/virtual/gpio/gpio200
lrwxrwxrwx root     root              2013-06-20 10:57 gpio24 -> ../../devices/virtual/gpio/gpio24
lrwxrwxrwx root     root              2013-06-20 10:57 gpio72 -> ../../devices/virtual/gpio/gpio72
lrwxrwxrwx root     root              2013-06-20 10:57 gpio75 -> ../../devices/virtual/gpio/gpio75
lrwxrwxrwx root     root              2013-06-20 10:57 gpio90 -> ../../devices/virtual/gpio/gpio90
lrwxrwxrwx root     root              2013-06-20 10:57 gpio91 -> ../../devices/virtual/gpio/gpio91
lrwxrwxrwx root     root              2013-06-20 10:57 gpiochip0 -> ../../devices/virtual/gpio/gpiochip0
lrwxrwxrwx root     root              2013-06-20 10:57 gpiochip128 -> ../../devices/virtual/gpio/gpiochip128
lrwxrwxrwx root     root              2013-06-20 10:57 gpiochip160 -> ../../devices/virtual/gpio/gpiochip160
lrwxrwxrwx root     root              2013-06-20 10:57 gpiochip192 -> ../../devices/virtual/gpio/gpiochip192
lrwxrwxrwx root     root              2013-06-20 10:57 gpiochip32 -> ../../devices/virtual/gpio/gpiochip32
lrwxrwxrwx root     root              2013-06-20 10:57 gpiochip64 -> ../../devices/virtual/gpio/gpiochip64
lrwxrwxrwx root     root              2013-06-20 10:57 gpiochip96 -> ../../devices/virtual/gpio/gpiochip96
--w------- root     root         4096 2013-06-20 10:57 unexport

Continue reading “Working with GPIO on the Wandboard and Writing an Android Driver for GPIO Interrupts”

How to get started with Embedded Android on the Wandboard: Building and Deploying the Bootloader, Kernel and Android Root File System

wandboard

The community based Wandboard project (http://www.wandboard.org) is a very interesting open Freescale iMx6 hardware platform. The most recent release of the Android 4.2.2 Source Code for the board makes it an ideal candidate to prototype an Embedded Android System.

For this Blog Post we are using:
Android 4.2.2 wandboard repo sources
IMX Kernel 3.0.35+ (supplied by the Android sources)
U-Boot IMX Fork (supplied by the Android sources)
Host: Ubuntu 12.10 64 Bit (username: user)

Understanding how Android Boots

In this blog post we are looking a bit closer in how to get started with booting the platform using the patched Linux Kernel and u-boot. Both come with the Android Source code which is available for downloading with Android’s repo tool.

Continue reading “How to get started with Embedded Android on the Wandboard: Building and Deploying the Bootloader, Kernel and Android Root File System”

Embedded Android Tutorial: Part II, Setting up the Arduino to measure light intensity and reconfigure the Pandaboard’s kernel for communication

In this post we are going to set up the Arduino Uno to measure light intensity. Furthermore, we configure and recompile the Pandaboard’s kernel to communicate with the Arduino Uno through USB-serial.

For measuring light, we will require some kind of photoresistor. If you do not have any spare ones around, you can easily get them on ebay. A photoresistor is a resistor that changes its resistance depending on the current light intensity. In the end, we will simply measure an analogue voltage that changes depending on the attached photoresistor.

For this tutorial you will need:

  • Pandaboard with Linaro’s Android build from Part I
  • Arduino Uno
  • 1 Photoresistor
  • 1 Resistor with a value around 3 kilo-ohm (we are using 3.9kOhm)
  • Breadboard
  • 3 jumper wire cables (male-male)

Continue reading “Embedded Android Tutorial: Part II, Setting up the Arduino to measure light intensity and reconfigure the Pandaboard’s kernel for communication”

Embedded Android Tutorial: Part I, Setting up the Pandaboard with the Linaro Android Build

Recently we have been setting up the Pandaboard with Android to get started with Embedded System Development.

In this first post we would like to share of what steps were necessary to set up the build environment, Android source from Linaro and toolchain to get started on an Ubuntu 12.04 64 Bit machine.

Android Build and Version: Linaro Android Build, 4.1.1 Jellybean
Host Machine: Lenovo T420, Ubuntu 12.04 64 Bit
Hardware Target: Pandaboard
Deployment Target: SD-Card

Please note that since the Android ICS release, the Android Source can (sadly) only be built on a 64 bit OS, without the need to do workarounds.

Important Links for further reading:

Linaro Android Project
Build Environment Initializing
Current Linaro Build version information

Setting up the build environment

Before you can get started to build the Android Source code and Kernel, you need to set up the build environment properly. Part of this is installing packages from the Ubuntu repositories (for instance build tools like make and host side gcc etc.) and also the java version (from sun/oracle) which cannot be found in the current Ubuntu repositories.

Continue reading “Embedded Android Tutorial: Part I, Setting up the Pandaboard with the Linaro Android Build”

OsciPrime – An Open Source Android Oscilloscope, new release

Today, it is my pleasure to announce the release of our all new open source Android application of the OsciPrime Oscilloscope. We worked eagerly to bring a large amount of requested and desired features to our Android application, and guess what, it is all Open Source.

OsciPrime Oscilloscope

With the new release we also announced that we are in the process of making our hardware board available for ordering. Check all news out on our product website www.osciprime.com.

Features and improvements of the new application are:

=> Mutlitouch Interface
=> Control Interleave, Attenuation, Offset, Zoom, etc.
=> Using the new Android USB API for communication with the hardware board
=> Neat new User Interface, as modular as possible
=> Improved processing performance for both Audio and USB

Screenshot of the OsciPrime Android App

If you want to support our open source development and always receive the newest version of the scope, then consider purchasing our application from the Android Market here.

If you want to meet us and find out more about the project, then join us on the 10. of July 2012 at the Libre Software Meeting in Geneva, where we are going to present our Open Source Project.

Head over to our OsciPrime Website to catch the latest source code and APK. here.

We are eager to hear your thoughts and improvements of the applications in the comments section.

OsciPrime Website
OsciPrime Android Market Site
OsciPrime Source Code