Development of Applications Using GPIO Pins on the DragonBoard 410c With Android and Linux Operating Systems

About: Frederico Martins Pedroso Junior, 29 yo, Computer Engineer.

Intro: Development of Applications Using GPIO Pins on the DragonBoard 410c With Android and Linux Operating Systems

The purpose of this tutorial is to show information needed to develop applications using the GPIO pin on DragonBoard 410c low-speed expansion.

This tutorial presents information for developing applications using the GPIO pins with SYS on the Android and Debian operating systems.

NOTE:

This link contains helpful information about low-speed expansion on the DragonBoard 410c.

Step 1: Mapping Pins to the Operating System

  • For each operating system there is a specific mapping for the low speed expansion pins;
  • The pin mapping for each operating system is found in the 96boards documentation for DragonBoard 410c.

Step 2: Led on DragonBoard 410c

Considering the Led plugged into pin 23.

Step 3: Mapping Pins - Android

On Android, Pin 23 is the GPIO938.

Step 4: Accessing GPIO Via SYS on Android

Access the /sys/class/gpio directory:

cd /sys/class/gpio

Considering the Led on pin 23:

# echo 938 > export

# cd gpio938

Enabling Led as Output:

# echo "out" > direction

Turning on / off the Led:

# echo "1" > value

# echo "0" > value

Step 5: Mapping Pins - Debian GNU/Linux

On Debian GNU/Linux, Pin 23 is the GPIO36.

Step 6: Accessing GPIO Via SYS on Debian GNU/Linux

Access the /sys/class/gpio directory:

cd /sys/class/gpio

Considering the Led on pin 23:

# echo 36 > export 

# cd gpio36

Enabling Led as Output:

# echo "out" > direction

Turning on / off the Led:

# echo "1" > value 

# echo "0" > value

Share

    Recommendations

    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge
    • Optics Contest

      Optics Contest
    • Plastics Contest

      Plastics Contest

    Discussions