找到一个STM32F051的板子,发现板子基本的调试都忘光了,熟悉了半天开发板,先把数据读出来再说。串口返回数据如下,
参考其他的例程,先设置几个参数(具体的参数都打印出来 了),语文是没学好,都不知道该说些什么了,用过的朋友帮忙看下结果是否正确,传感器板子放在桌子上不动,返回的如下结果。
Start ...
SET_ODR_OK
SET_ODR_M_OK
SET_MODE_OK
SET_MODE_MAG_OK
SET_FULLSCALE_OK
SET_GAIN_MAG_OK
SET_AXIS_OK
AXIS_X value is -41
AXIS_Y value is 1
AXIS_Z value is -1058
AXIS_X value is -41
AXIS_Y value is 1
AXIS_Z value is -1058
AXIS_X value is -41
AXIS_Y value is 1
AXIS_Z value is -1058
AXIS_X value is -43
AXIS_Y value is 2
AXIS_Z value is -1058
AXIS_X value is -43
AXIS_Y value is 2
AXIS_Z value is -1058
AXIS_X value is -43
AXIS_Y value is 2
AXIS_Z value is -1058
AXIS_X value is -43
AXIS_Y value is 2
AXIS_Z value is -1058
AXIS_X value is -43
AXIS_Y value is 2
AXIS_Z value is -1062
AXIS_X value is -46
AXIS_Y value is 3
AXIS_Z value is -1062
AXIS_X value is -46
AXIS_Y value is 3
AXIS_Z value is -1062
AXIS_X value is -46
AXIS_Y value is 3
AXIS_Z value is -1062
AXIS_X value is -46
AXIS_Y value is 3
AXIS_Z value is -1062
AXIS_X value is -44
AXIS_Y value is 3
AXIS_Z value is -1063
AXIS_X value is -44
AXIS_Y value is 3
AXIS_Z value is -1063
AXIS_X value is -44
AXIS_Y value is 3
AXIS_Z value is -1063
AXIS_X value is -44
AXIS_Y value is 3
AXIS_Z value is -1063
AXIS_X value is -44
AXIS_Y value is 3
AXIS_Z value is -1063
AXIS_X value is -45
AXIS_Y value is 6
AXIS_Z value is -1059
本文来自论坛,点击查看完整帖子内容。