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¶
Install necessary packages.
sudo apt install build-essential cmake
Create a working space under the
/home
directory and navigate to it.
mkdir neuronlibex_ws
cd neuronlibex_ws
Copy the example file to your working space.
cp -r /opt/adlink/neuron-sdk/neuron-library/share/mraa/* .
Create a “build” directory under your working space and navigate to it.
mkdir build
cd build
Build the examples.
cmake ../examples/
make
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¶
Create a working space under the
/home
directory and navigate to it.
mkdir neuronlibex_ws
cd neuronlibex_ws
Copy the example file to your working space.
cp -r /opt/adlink/neuron-sdk/neuron-library/share/mraa/* .
Move into the directory with the python examples.
cd examples/python/
Run the python3 examples:
python3 <the example you want to execute>.py
Note
Refer to Python Examples for more usage