This repository contains a minimal driver to use Murata SCA3300-D01 3-axis device.
First of all this library is really light. The code is probbaly not perfect but works. Feel free to fork it :)
This project is based on Meson/Ninja build system
More information Menson/Ninja : http://mesonbuild.com/
You will find 3 sub folders.
Once contains the library, once an Hello World and the last one some unit tests.
As the project is base on Meson you can find configuration files as:
Master Meson file
Binary Meson file
Librairie Meson file
[nicolas:Trash]% git clone ssh://***********************************ninja.git
Cloning into 'sca3300'...
remote: Counting objects: 21, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 21 (delta 4), reused 0 (delta 0)
Receiving objects: 100% (21/21), 11.27 KiB | 0 bytes/s, done.
Resolving deltas: 100% (4/4), done.
Checking connectivity... done.
[nicolas:Trash]% cd SCA3300
[nicolas:sca3300]% mkdir build && meson build
[nicolas:lib]% mkdir buildcross
[nicolas:lib]% meson buildcross --cross-file cross_file.txt
Note: As with Make you have access to the clean command:
[nicolas:lib]% ninja -C buildcross clean
ninja: Entering directory `buildcross'
[1/1] 'Cleaning'
Cleaning... 7 files.
[nicolas:lib]% ninja -C buildcross
ninja: Entering directory `buildcross'
[4/4] Linking target src/example/sca3300-exe
[nicolas:sca3300]% doxygen Doxyfile
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for msc files...
Searching for dia files...
Searching for files to exclude
Searching INPUT for files to process...
Searching for files in directory ~/workspace/murata/sca3300/lib/src
Searching for files in directory ~/workspace/murata/sca3300/lib/src/example
Searching for files in directory ~/workspace/murata/sca3300/lib/src/libsca3300
Reading and parsing tag files
Parsing files
Preprocessing ~/workspace/murata/sca3300/lib/src/example/example.cpp...
Parsing file ~/workspace/murata/sca3300/lib/src/example/example.cpp...
Preprocessing ~/workspace/murata/sca3300/lib/src/libsca3300/sca3300.cpp...
Parsing file ~/workspace/murata/sca3300/lib/src/libsca3300/sca3300.cpp...
Preprocessing ~/workspace/murata/sca3300/lib/src/libsca3300/sca3300.h...
Parsing file ~/workspace/murata/sca3300/lib/src/libsca3300/sca3300.h...
Preprocessing ~/workspace/murata/sca3300/lib/src/libsca3300/sca3300def.h...
Parsing file ~/workspace/murata/sca3300/lib/src/libsca3300/sca3300def.h...
finished...
[nicolas:sca3300]% firefox doc/html/index.html
Build:
[nicolas:lib]% ninja -C buildcross
ninja: Entering directory `buildcross'
[3/3] Linking target src/example/sca3300-exe
Send binary to the raspberry pi:
[nicolas:lib]% scp -o IdentitiesOnly=yes buildcross/src/example/sca3300-exe [email protected]:/home/pi
[email protected]'s password:
sca3300-exe 100% 285KB 285.0KB/s 00:00
Establish SSH connection:
[nicolas:lib]% ssh -o IdentitiesOnly=yes [email protected]
Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Apr 3 11:15:00 2019 from 10.2.161.92
SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
pi@raspberrypi:~ $ ./sca3300-exe
[OK] Change Mode done.
[OKAY] sca3300 getting probed successfully.
Temperature: 24.0458 °C | raw: 5617
Temperature: 24.0987 °C | raw: 5618
Ninja
Meson
Wiki de Quentin Gliech
Un petit tour des systemes de build