Arducam B0580-002 IMU sensor SDK release package. It provides C / C++ / Python APIs for scanning devices, opening the IMU, and reading accelerometer, gyroscope, temperature, and timestamp data.
See the full API documentation in doc/arducamb0580-002sdk.pdf.
Follow the following tutorial to build the complete program.
.
├── assets/ # Example screenshots
├── doc/ # SDK documentation
│ └── arducamb0580-002sdk.pdf
├── examples/
│ ├── CMakeLists.txt # Build C / C++ examples together
│ ├── c/
│ │ ├── CMakeLists.txt
│ │ └── demo_c.c
│ ├── c++/
│ │ ├── CMakeLists.txt
│ │ └── demo_cpp.cpp
│ └── python/
│ ├── demo_py.py
│ ├── pose_show.py
│ └── requirements.txt
├── library/
│ ├── amd64/ # x86_64 deb / wheel packages
│ ├── arm64/ # aarch64 deb / wheel packages
│ └── armhf/ # armv7l deb / wheel packages
├── scripts/
│ └── build_examples.sh # One-click C / C++ build, output to bin/
└── README.md
| Architecture | deb package directory | Python wheel |
|---|---|---|
| amd64 (x86_64) | library/amd64/ |
cp38 ~ cp313 |
| arm64 (aarch64) | library/arm64/ |
cp38 ~ cp313 |
| armhf (armv7l) | library/armhf/ |
cp38 ~ cp313 |
You can get the SDK with git clone or by downloading a ZIP from GitHub. All later steps assume your shell is in the project root (the folder that contains README.md, library/, and examples/).
-
Open a terminal.
-
Create a working directory and enter it:
mkdir -p Arducam-B0580-002
cd Arducam-B0580-002- If
gitis already installed, skip this step. Check with:
git --versionIf the command prints a version (for example git version 2.x.x), git is installed and you can go to step 4. Otherwise, please execute the following command to install:
# Debian / Ubuntu / Raspberry Pi OS
sudo apt update && sudo apt install -y git- Clone the repository:
git clone https://github.com/ArduCAM/B0580-002-SDK.git
cd B0580-002-SDK- Verify the download is complete. Key directories and files should exist:
test -f README.md \
&& test -d library/amd64 && test -d library/arm64 && test -d library/armhf \
&& test -d examples/c && test -d examples/c++ && test -d examples/python \
&& test -d doc && test -d scripts \
&& echo "Download OK" \
|| echo "Download incomplete"- If the output is
Download OK, continue with the installation steps below. - If the output is
Download incomplete(network interruption, partial clone, etc.), delete the incomplete repository and clone again:
cd ..
rm -rf B0580-002-SDK
git clone https://github.com/ArduCAM/B0580-002-SDK.git
cd B0580-002-SDKThen repeat step 5. If it still fails, check your network connection and retry.
- Download the ZIP from GitHub and extract it.
- Open a terminal and switch to the extracted project root yourself (for example
cd ~/Downloads/B0580-002-SDK-mainorcd ~/Arducam-B0580-002/B0580-002-SDK).
There is no .git directory in a ZIP download, so commands like cd "$(git rev-parse --show-toplevel)" will not work. Before performing the installation and build steps below, please use the cd to enter the project root directory (B0580-002-SDK).
sudo dpkg -i library/$(dpkg --print-architecture)/arducam-B0580-002-sdk_0.1.0_*.debpip3 install --no-index \
--find-links=library/amd64 \
--find-links=library/arm64 \
--find-links=library/armhf \
arducam_b0580_002_sdk_pypose_show.py needs OpenCV and NumPy (not included with the SDK wheel):
pip3 install -r examples/python/requirements.txtEach block below starts from the project root. If you used git clone, run cd "$(git rev-parse --show-toplevel)" first. If you downloaded the ZIP, please do not execute the cd "$(git reverse path -- show toplevel)" and switch to the project root directory by yourself (B0580-002-SDK).
Option 1 builds the C and C++ demos separately. Option 2 builds both C and C++ demos with one command.
# Use git clone to run this command back to the project root directory
cd "$(git rev-parse --show-toplevel)"cd examples/c
mkdir -p build && cd build
cmake ..
make
./demo_cExpected output:
# Use git clone to run this command back to the project root directory
cd "$(git rev-parse --show-toplevel)"cd examples/c++
mkdir -p build && cd build
cmake ..
make
./demo_cppExpected output:
# Use git clone to run this command back to the project root directory
cd "$(git rev-parse --show-toplevel)"./scripts/build_examples.shThe script builds the C / C++ examples with examples/CMakeLists.txt, copies the executables to the project-root bin/ directory, and removes intermediate build files.
./bin/demo_c
./bin/demo_cppSee the C / C++ screenshots above for expected output.
python3 examples/python/demo_py.pyExpected output:
Attitude visualization example (requires OpenCV and NumPy; install with pip3 install -r examples/python/requirements.txt):
This demo needs a local graphical display. If you use a remote terminal (for example SSH), set up display forwarding yourself.
python3 examples/python/pose_show.pyPress q on the keyboard to quit the program.
Terminal output:
Visualization window:
| File | Description |
|---|---|
examples/c/demo_c.c |
C API example |
examples/c++/demo_cpp.cpp |
C++ API example |
examples/python/demo_py.py |
Python API example |
examples/python/pose_show.py |
Attitude visualization with Mahony filter |
device_scanner: Scan Arducam devices and resolve I2C bus / IMU addressesopen_imu/open_imu_path: Open the IMUread_imu: Read raw sensor dataaccel_to_g/gyro_to_dps/temp_to_c: Convert raw values to physical unitsdevices_free: Free the device list resources
Full API documentation: doc/arducamb0580-002sdk.pdf




