microReticulumTbeam/exercises/25_motioncal_tbeam
2026-04-25 04:23:28 -07:00
..
scripts Works, but on jp so sluggish as to work intermittently, will try on eos 2026-04-25 04:19:17 -07:00
src Works, but on jp so sluggish as to work intermittently, will try on eos 2026-04-25 04:19:17 -07:00
platformio.ini Works, but on jp so sluggish as to work intermittently, will try on eos 2026-04-25 04:19:17 -07:00
README.md Reference to Gentoo build notes 2026-04-25 04:23:28 -07:00

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)

See https://github.com/PaulStoffregen/MotionCal/issues/25 for Gentoo build tricks.

MotionCal expects:

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:

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

cd /usr/local/src/microreticulum/microReticulumTbeam/exercises/25_motioncal_tbeam
source /home/jlpoole/rnsenv/bin/activate
pio run

Upload

source /home/jlpoole/rnsenv/bin/activate
pio run -t upload

Use a specific board environment if needed:

pio run -e guy -t upload

MotionCal

Build and run MotionCal as before:

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.