Usage

API

Neuron Library provides two kinds of API:

Pin Mapping

This library is developed for ADLINK products. Supported hardware and information about the ROSCube I/O pin mapping can be found at: https://github.com/Adlink-ROS/mraa#supported-hardware.

C Example

  1. Install necessary packages.

sudo apt install build-essential cmake
  1. Create a working space under the /home directory and navigate to it.

mkdir neuronlibex_ws
cd neuronlibex_ws
  1. Copy the example file to your working space.

cp -r /opt/adlink/neuron-sdk/neuron-library/share/mraa/* .
  1. Create a “build” directory under your working space and navigate to it.

mkdir build
cd build
  1. Build the examples.

cmake ../examples/
make
  1. Run the examples under the directory ~/neuronlibex_ws/build/c/.

cd c/
./<the example you want to execute>

Note

Refer to C Examples for more usage

Python Example

  1. Create a working space under the /home directory and navigate to it.

mkdir neuronlibex_ws
cd neuronlibex_ws
  1. Copy the example file to your working space.

cp -r /opt/adlink/neuron-sdk/neuron-library/share/mraa/* .
  1. Move into the directory with the python examples.

cd examples/python/
  1. Run the python3 examples:

python3 <the example you want to execute>.py

Note

Refer to Python Examples for more usage