57 lines
1.2 KiB
Markdown
57 lines
1.2 KiB
Markdown
# Exercise 25: MotionCal T-Beam Bridge
|
|
|
|
Streams the T-Beam Supreme QMC6310 magnetometer in the ASCII format accepted by
|
|
Paul Stoffregen's MotionCal desktop tool.
|
|
|
|
https://github.com/PaulStoffregen/MotionCal.git (fetch)
|
|
|
|
MotionCal expects:
|
|
|
|
```text
|
|
Raw:accel_x,accel_y,accel_z,gyro_x,gyro_y,gyro_z,mag_x,mag_y,mag_z
|
|
```
|
|
|
|
This exercise only has a magnetometer, so it sends a stationary accelerometer
|
|
placeholder and zero gyro:
|
|
|
|
```text
|
|
Raw:0,0,8192,0,0,0,mag_x,mag_y,mag_z
|
|
```
|
|
|
|
The magnetic values are converted from SensorLib Gauss readings into MotionCal's
|
|
integer units where 1 count is 0.1 microtesla.
|
|
|
|
## Build
|
|
|
|
```sh
|
|
cd /usr/local/src/microreticulum/microReticulumTbeam/exercises/25_motioncal_tbeam
|
|
source /home/jlpoole/rnsenv/bin/activate
|
|
pio run
|
|
```
|
|
|
|
## Upload
|
|
|
|
```sh
|
|
source /home/jlpoole/rnsenv/bin/activate
|
|
pio run -t upload
|
|
```
|
|
|
|
Use a specific board environment if needed:
|
|
|
|
```sh
|
|
pio run -e guy -t upload
|
|
```
|
|
|
|
## MotionCal
|
|
|
|
Build and run MotionCal as before:
|
|
|
|
```sh
|
|
cd /usr/local/src/MotionCal
|
|
make WXCONFIG=wx-config LDFLAGS="-lglut -lGLU -lGL -lm"
|
|
GDK_BACKEND=x11 ./MotionCal
|
|
```
|
|
|
|
Select the T-Beam USB serial port in MotionCal. The firmware also accepts
|
|
MotionCal's 68-byte calibration packet and echoes `Cal1:` and `Cal2:` lines so
|
|
MotionCal can confirm the send.
|