Example io demo UPDATE 2019
This demo covers basic GPIO usage for the IPAC single board computer, and 150 and 200 series carrier boards. This demo first cover GPIO manipulation through the Linux terminal and then demonstrates gpio usage in a C program using an io example program.
Contents
Hardware Requirements
To use the io demo program you will need the following target hardware.
- An EMAC 150 series carrier board with a compatible SoM
OR
- An EMAC 200 series carrier board with a compatible SoM
OR
- an IPAC
AND
- additional components to establish to serial and Ethernet connections for your target hardware
Software Requirments
These tools should already be installed if you installed the EMAC SDK using the automatic installer.
- EMAC OE 5.X SDK
- EMAC Qt Creator
- GNU
make
- CMake
Setup
If you haven't already, please review the EMAC_OE_SDK "getting started" page. EMAC_OE_SDK will need to be installed and serial and network connections will need to be established between the developer machine and the target device.See the Serial Connections or Network Connections page for more information on how to connect to the target EMAC product using a serial port or Ethernet connection.
GPIO manipulation through Linux Terminal
GPIOs can be manipulated directly through the target devices serial terminal.
GPIO manipulation in C
A more common manipulation of GPIOs is through a C program. The following example will demonstrated GPIO manipulation using the Libgpiod libary.
On the target device:
-
Login
-
Change the file to read write if required
On the host machine:
-
Open qt Creator
-
Create a new project
- select
-
Choose either qmake or cmake option
-