This is a stand-alone example application using the Anybus CompactCom Driver API (abcc-api) ported for the Anybus CompactCom Adapter Board - Module to Raspberry Pi evaluation platform.
To enable easy evaluation and inspiration to Anybus CompactCom prospects.
- This example application shall be built for and ran in a Linux environment.
- The library LIBGPIOD is required. Install this library with the following command:
apt install libgpiod-dev
- If you do not yet have CMake and want to use it for building, install it with the following command:
apt install -y cmake
You might need to insert sudo
before the commands if your user is not authorized for the installations.
This repository contain submodules abcc-driver-api, (abcc-driver and abcc-abp that must be initialized. Therefore, pass the flag --recurse-submodules
when cloning.
git clone --recurse-submodules https://github.com/hms-networks/abcc-example-raspberrypi.git
If you did not pass the flag --recurse-submodules
when cloning, the following command can be run:
git submodule update --init --recursive
This example application utilizes the Anybus CompactCom Driver API's CMake module file in a top level CMakelLists.txt file to generate a complete Visual Studio project. To generate the project, run the lines below, starting in the repository root.
mkdir build
cd build
Generate a makefile with CMake:
cmake ..
Compile the target by running the generated makefile in the build/ folder:
make
Run the compiled executable in the build/ folder:
./raspberry_pi_example_project
Run the Makefile in the repository root to compile:
make
Run the compiled executable:
./raspberry_pi_example_project
Make sure that SPI is enabled in your Raspberry Pi configurations and that your CompactCom is attached correctly. See the Adapter Board for Raspberry Pi INSTALLATION GUIDE for more details.