When I started working on a DragonBoard 410c, I had so many difficulties to find simple things tutorials, because the makers assume that you already know how to do the basics, then in this tutorial, I will explain in detail how to connect and use some LEDs with the DragonBoard 410c (DB 410c). This method you can use for others things like DC motors, etc.

Step 1: Materials

1 - Keyboard;

1 - Mouse;

1 - Monitor with HDM;

1 - Protoboard;

1 - Tip 122;

1 - LED;

1 - 220 ohm resistors;

Some jumpers.

Step 2: Install Debian

Follow this tutorial to install the Debian System: 96 Boards Tutorial

Step 3: Step 3: Start the DragonBoard 410c

Connect a monitor, keyboard, and mouse. It can be used as a normal Linux desktop computer if you attach a keyboard, mouse, and monitor. Use the “Terminal” application to get a command prompt.

Step 4: Connect to the Internet

On the bottom right side, has an option to connect the DB 410c to the internet, like a Linux.

Step 5: Update Debian

Make sure all of the Debian packages are up to date before trying to install the packages.

Put on LXTerminal:

sudo apt-get update
sudo apt-get dist-upgrade -u
Do you want to continue? [Y/n] y

Step 6: Install Extra Tool Packages

To run these demos, we’ll install the Debian packages for the standard Linux development tools, the Python environment, and the Arduino toolchain. Then we'll install the MRAA and UPM packages from source.

Put on LXTerminal:

sudo apt-get install arduino-mk arduino git build-essential autoconf libtool swig3.0 python-dev nodejs-dev cmake pkg-config libpcre3-dev
sudo apt-get clean

Step 7: Configure the Software

The last step is to install some configuration files so that the development tools know which devices to use. Fetch the 96boards-tools package and install the provided configuration files:

Put on LXTerminal:

sudo adduser linaro i2c # Allow the normal user to perform i2c operations
git clone   https://github.com/96boards/96boards-tools
sudo cp 96boards-tools/70-96boards-common.rules /etc/udev/rules.d/
cat | sudo tee /etc/profile.d/96boards-sensors.sh << EOF 
export JAVA_TOOL_OPTIONS="-Dgnu.io.rxtx.SerialPorts=/dev/tty96B0" 
export MONITOR_PORT=/dev/tty96B0 
export PYTHONPATH="$PYTHONPATH:/usr/local/lib/python2.7/site-packages"
sudo cp /etc/profile.d/96boards-sensors.sh /etc/X11/Xsession.d/96boardssensors

Now reboot the system to pick up all the changes:

Put on LXTerminal:

sudo reboot

Step 8: Fetch the Sample Code for Projects in This Guide

Put on LXTerminal:

git clone https://github.com/96boards/Sensor_Mezzanine_Getting_Started

Now, on Downloads folder, you have so many examples files to help you on future projects.

Now, let's start to get the hands dirty

Step 9: The Hardware

The only thing you need to do is put the LED on the protoboard, connect positive of the LED in series with the resistor, connected to the 5v, and the negative of the LED, on the collector of the Tip 122. The base, you connect to DragonBoard GPIO pins. Follow the image attached.

The "Signal" wire you should put on the GPIO pin on the DragonBoard 410c, the 5v and GND on their respective pins on the DB 410c (Attached image with DragonBoard and Tip 122 pin out)

Step 10: The Software

On the DragonBoard open the folder would you like to save your project and with the right button click on a blank space, and select "New File", put the name of the project and the extension ".py" like this: "LED.py"

Open the file and paste the attached code that was taken from one of the examples in the UPM library.

(This case I use pin 27 on DB 410c)

Step 11: Execution

Now, after saving the code, you should open the LXTerminal (On system tools) and the two commands with you most use: "ls" to list all items in the folder, and "cd" to get in a folder, and you should go to the folder you saved the code file to.

Ex: If my code file (LED.py) are in a "Codes" folder on Downloads, I type this on LXTerminal:

cd Downloads
cd Codes

Now, when I'm in the folder, I open the code file with the command:

sudo python LED.py

And the code is executed. If have an error, it will show on the LXTerminal.

Step 12: References

1. https://github.com/96boards/Sensor_Mezzanine_Gett...

2. https://github.com/intel-iot-devkit/upm

About This Instructable



More by Roberto Pinheiro:DragonBoard 410c and LED Strip 5050 (Beginners) DragonBoard 410c and LED (Beginners) DragonBoard 410c and PushButton (Beginners) 
Add instructable to: