Waveshare Pico 10-DOF IMU Sensor
The Waveshare Pico 10-DOF IMU Sensor [1] shield is a pico sized multi sensor module designed for the Raspberry Pi Pico and gives the ability to collect environmental data like temperature and air pressure. It can also be used to build a robot that can detect motion and orientation. It communicates with the Raspberry Pi Pico over I2C.
Board Overview
Hardware
There are two significantly different main revisions of this shield. Revision 1 uses the ICM-20948 as DOF sensor, revision 2.1 the MPU-9250. Both sensors are functionally compatible. The major difference between the two versions is the interface for the interrupt lines. These are connected to different GPIO pins.
Printed Circuit Board Rev2.1 |
Printed Circuit Board Rev1 |
![]() |
![]() |
Features and Resources |
5V/~5㎃ 3.3V/~6㎃ TP : T P 9-DOF 4 1
Design Data |
Positions
Data Sheets
Pinouts
Revision 2.1
Revision 1
Components
Default Setup |
Devicetree / Kconfig |
|
|
|
LPS22HB in boards/rpipico_r3.dtsi
1wsptdis_sens_tp: lps22hb@5c {
2 status = "disabled";
3 compatible = "st,lps22hb-press";
4 reg = <0x5c>;
5};
|
MPU-9250 [14] with AK8963 [7] (ICM-20948 [10] with AK09916 [7]) |
Default Setup |
Devicetree / Kconfig |
|
|
INTERIME SUPPORT, because of obsolete component MPU-9250 in boards/rpipico_r3.dtsi
1wsptdis_sens_dof: mpu9250@68 {
2 status = "disabled";
3 compatible = "invensense,mpu9250";
4 reg = <0x68>;
5 accel-fs = <2>;
6 accel-dlpf = "5.05";
7 gyro-fs = <250>;
8 gyro-dlpf = <5>;
9 gyro-sr-div = <9>;
10};
NOT YET SUPPORTED, because of missing driver
|
Default Setup |
Devicetree / Kconfig |
|
Ultra-low noise, ultra-fast CMOS LDO regulator for 3.3V
|
|
|
Revision Distinction
LPS22HB
Revision 2.1 |
Revision 1 |
LPS22HB in boards/waveshare_pico_10dof_imu_sensor_r2/rpipico_r3.dtsi
1&wsptdis_sens_tp {
2 status = "okay";
3 /*
4 * Interrupt request connected at
5 * GP5 but not supported by driver:
6 * irq-gpios = <&rpipico_header 5 GPIO_ACTIVE_HIGH>;
7 */
8};
|
LPS22HB in boards/waveshare_pico_10dof_imu_sensor_r1/rpipico_r3.dtsi
1&wsptdis_sens_tp {
2 status = "okay";
3 /*
4 * Interrupt request connected at
5 * GP3 but not supported by driver:
6 * irq-gpios = <&rpipico_header 3 GPIO_ACTIVE_HIGH>;
7 */
8};
|
MPU-9250 (ICM-20948)
Revision 2.1 |
Revision 1 |
MPU-9250 in waveshare_pico_10dof_imu_sensor_r2.conf
1CONFIG_MPU9250_TRIGGER_NONE=n
MPU-9250 in boards/waveshare_pico_10dof_imu_sensor_r2/rpipico_r3.dtsi
1&wsptdis_sens_dof {
2 status = "okay";
3 irq-gpios = <&rpipico_header 4 GPIO_ACTIVE_HIGH>; /* GP4 */
4 /*
5 * Frame synchronize connected at
6 * GP22 but not supported by driver:
7 * fsync-gpios = <&rpipico_header 22 GPIO_ACTIVE_HIGH>;
8 */
9};
|
MPU-9250 in waveshare_pico_10dof_imu_sensor_r1.conf
1CONFIG_MPU9250_TRIGGER_NONE=n
MPU-9250 in boards/waveshare_pico_10dof_imu_sensor_r1/rpipico_r3.dtsi
1&wsptdis_sens_dof {
2 status = "okay";
3 irq-gpios = <&rpipico_header 2 GPIO_ACTIVE_HIGH>; /* GP2 */
4 /*
5 * Frame synchronize connected at
6 * GP16 but not supported by driver:
7 * fsync-gpios = <&rpipico_header 16 GPIO_ACTIVE_HIGH>;
8 */
9};
INTERIME SUPPORT, because of missing correct driver for ICM-20948. |
Utilization
Sensing Subsystem
The shield is ready for using with the Zephyr Sensing Subsystem. The
interface is disabled for default and can be enabled by an application overlay
app.overlay
(see Application Development).
Sensing Interface on Shield Level |
Overlay Content on Application Level |
Sensing Interface in waveshare_pico_10dof_imu_sensor.dtsi
1/ {
2 wsptdis_sensing: wsptdis-sensing {
3 compatible = "zephyr,sensing";
4 status = "disabled";
5
6 wsptdis_accel: wsptdis-accel {
7 compatible = "zephyr,sensing-phy-3d-sensor";
8 status = "disabled";
9 sensor-types = <SENSING_SENSOR_TYPE_MOTION_ACCELEROMETER_3D
10 SENSING_SENSOR_TYPE_MOTION_GYROMETER_3D
11 SENSING_SENSOR_TYPE_MOTION_MOTION_DETECTOR>;
12 friendly-name = "WSP 10-DOF IMU Shield Accelerometer";
13 minimal-interval = <625>;
14 underlying-device = <&wsptdis_sens_dof>;
15 };
16 };
17};
|
|
Programming
Set -DSHIELD=<shield_name_with_rev>
to the right shield revision when you
invoke west build
or cmake
in your Zephyr application. For example:
for Revision 2.1:
-DSHIELD=waveshare_pico_10dof_imu_sensor_r2
for Revision 1:
-DSHIELD=waveshare_pico_10dof_imu_sensor_r1
The following examples use the shield in revision 2.1. If these should be used
for revision 1, the variable SHIELD
must be adapted accordingly.
Startup logging output on target
***** delaying boot 4000ms (per build configuration) *****
[00:00:00.331,000] <wrn> udc_rpi: BUS RESET
[00:00:00.411,000] <wrn> udc_rpi: BUS RESET
*** Booting Zephyr OS build v4.1.0… (delayed boot 4000ms) ***
Hello World! I'm THE SHELL … … …
uart:~$ █
Using west:
west build -b rpi_pico -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r2 -d build/waveshare_pico_10dof_imu_sensor-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_10dof_imu_sensor-helloshell -GNinja -DBOARD=rpi_pico -DSHIELD="waveshare_pico_10dof_imu_sensor_r2" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_10dof_imu_sensor-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h
hello - say hello
uart:~$ hello
Hello from shell.
uart:~$ hwinfo devid
Length: 8
ID: 0x8c998be1de969148
uart:~$ kernel version
Zephyr version 4.1.0
uart:~$ bridle version
Bridle version 4.1.0
uart:~$ bridle version long
Bridle version 4.1.0.0
uart:~$ bridle info
Zephyr: 4.1.0
Bridle: 4.1.0
uart:~$ device list
devices:
- clock-controller@40008000 (READY)
DT node labels: clocks
- reset-controller@4000c000 (READY)
DT node labels: reset
- snippet_cdc_acm_console_uart (READY)
DT node labels: snippet_cdc_acm_console_uart
- uart@40034000 (READY)
DT node labels: uart0 pico_serial rpipico_serial
- timer@40054000 (READY)
DT node labels: timer
- gpio@40014000 (READY)
DT node labels: gpio0
- adc@4004c000 (READY)
DT node labels: adc
- flash-controller@18000000 (READY)
DT node labels: ssi
- i2c@40048000 (READY)
DT node labels: i2c1 pico_i2c1 rpipico_i2c1
- vreg@40064000 (READY)
DT node labels: vreg
- rtc@4005c000 (READY)
DT node labels: rtc
- leds (READY)
- lps22hb@5c (READY)
DT node labels: wsptdis_sens_tp
- mpu9250@68 (READY)
DT node labels: wsptdis_sens_dof
uart:~$ history
[ 0] history
[ 1] device list
[ 2] bridle info
[ 3] bridle version long
[ 4] bridle version
[ 5] kernel version
[ 6] hwinfo devid
[ 7] hello
[ 8] hello -h
The Waveshare Pico Environment Sensor provides four on-shield sensors connected on I2C0.
uart:~$ i2c scan i2c@40048000
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
2 devices found on i2c@40048000
The I2C address
0x5c
is the STM LPS22HB [12], an air pressure and temperature sensor (TP).The I2C address
0x68
is the InvenSense MPU-9250 [14] with AK8963 [7], an motion and acceleration sensor (9-DOF) with 3-axis accelerometer, 3-axis gyroscope and 3-axis magnetometer (compass).
The “Who am I” register of the STM LPS22HB environmental sensor can read
from register 0x0f
and must be 0xb1
:
uart:~$ i2c read_byte i2c@40048000 5c 0f
Output: 0xb1
The “Who am I” register of the InvenSense MPU-9250 9-DOF sensor can read
from register 0x75
and must be 0x71
:
uart:~$ i2c read_byte i2c@40048000 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: (null)
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: (null)
LPS22HB (TP)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=457076700000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=457076700000ns (97.807176)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=458111600000ns (29.489999)
channel idx=14 press shift=7 num_samples=1 value=458111600000ns (97.802635)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=459521100000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=459521100000ns (97.801683)
MPU-9250 (9-DOF)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=34735791872ns (10.188524)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=34735791872ns (0.204703)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=34735791872ns (0.141855)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (10.188524, 0.204703, 0.141855)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=34735791872ns (-0.037571)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=34735791872ns (0.014787)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=34735791872ns (-0.018519)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (-0.037571, 0.014787, -0.018519)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=34735791872ns (0.105359)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=34735791872ns (-0.200868)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=34735791872ns (-0.590904)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (0.105359, -0.200868, -0.590904)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=34735791872ns (30.826346)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=35111755672ns (10.176553)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=35111755672ns (0.204703)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=35111755672ns (0.154425)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (10.176553, 0.204703, 0.154425)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=35111755672ns (-0.037970)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=35111755672ns (0.014787)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=35111755672ns (-0.017985)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (-0.037970, 0.014787, -0.017985)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=35111755672ns (0.091311)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=35111755672ns (-0.197344)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=35111755672ns (-0.567132)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (0.091311, -0.197344, -0.567132)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=35111755672ns (30.835328)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=35472841576ns (10.176553)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=35472841576ns (0.198119)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=35472841576ns (0.148439)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (10.176553, 0.198119, 0.148439)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=35472841576ns (-0.037970)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=35472841576ns (0.014521)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=35472841576ns (-0.017719)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (-0.037970, 0.014521, -0.017719)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=35472841576ns (0.091311)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=35472841576ns (-0.200868)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=35472841576ns (-0.577320)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (0.091311, -0.200868, -0.577320)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=35472841576ns (30.832334)
Using west:
west build -b rpi_pico/rp2040/w -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r2 -d build/waveshare_pico_10dof_imu_sensor-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_10dof_imu_sensor-helloshell -GNinja -DBOARD=rpi_pico/rp2040/w -DSHIELD="waveshare_pico_10dof_imu_sensor_r2" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_10dof_imu_sensor-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h
hello - say hello
uart:~$ hello
Hello from shell.
uart:~$ hwinfo devid
Length: 8
ID: 0x8c998be1de969148
uart:~$ kernel version
Zephyr version 4.1.0
uart:~$ bridle version
Bridle version 4.1.0
uart:~$ bridle version long
Bridle version 4.1.0.0
uart:~$ bridle info
Zephyr: 4.1.0
Bridle: 4.1.0
uart:~$ device list
devices:
- clock-controller@40008000 (READY)
DT node labels: clocks
- reset-controller@4000c000 (READY)
DT node labels: reset
- snippet_cdc_acm_console_uart (READY)
DT node labels: snippet_cdc_acm_console_uart
- uart@40034000 (READY)
DT node labels: uart0 pico_serial rpipico_serial
- timer@40054000 (READY)
DT node labels: timer
- gpio@40014000 (READY)
DT node labels: gpio0
- adc@4004c000 (READY)
DT node labels: adc
- flash-controller@18000000 (READY)
DT node labels: ssi
- i2c@40048000 (READY)
DT node labels: i2c1 pico_i2c1 rpipico_i2c1
- vreg@40064000 (READY)
DT node labels: vreg
- rtc@4005c000 (READY)
DT node labels: rtc
- leds (READY)
- lps22hb@5c (READY)
DT node labels: wsptdis_sens_tp
- mpu9250@68 (READY)
DT node labels: wsptdis_sens_dof
uart:~$ history
[ 0] history
[ 1] device list
[ 2] bridle info
[ 3] bridle version long
[ 4] bridle version
[ 5] kernel version
[ 6] hwinfo devid
[ 7] hello
[ 8] hello -h
The Waveshare Pico Environment Sensor provides four on-shield sensors connected on I2C0.
uart:~$ i2c scan i2c@40048000
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
2 devices found on i2c@40048000
The I2C address
0x5c
is the STM LPS22HB [12], an air pressure and temperature sensor (TP).The I2C address
0x68
is the InvenSense MPU-9250 [14] with AK8963 [7], an motion and acceleration sensor (9-DOF) with 3-axis accelerometer, 3-axis gyroscope and 3-axis magnetometer (compass).
The “Who am I” register of the STM LPS22HB environmental sensor can read
from register 0x0f
and must be 0xb1
:
uart:~$ i2c read_byte i2c@40048000 5c 0f
Output: 0xb1
The “Who am I” register of the InvenSense MPU-9250 9-DOF sensor can read
from register 0x75
and must be 0x71
:
uart:~$ i2c read_byte i2c@40048000 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: (null)
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: (null)
LPS22HB (TP)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=457076700000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=457076700000ns (97.807176)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=458111600000ns (29.489999)
channel idx=14 press shift=7 num_samples=1 value=458111600000ns (97.802635)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=459521100000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=459521100000ns (97.801683)
MPU-9250 (9-DOF)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=34735791872ns (10.188524)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=34735791872ns (0.204703)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=34735791872ns (0.141855)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (10.188524, 0.204703, 0.141855)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=34735791872ns (-0.037571)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=34735791872ns (0.014787)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=34735791872ns (-0.018519)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (-0.037571, 0.014787, -0.018519)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=34735791872ns (0.105359)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=34735791872ns (-0.200868)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=34735791872ns (-0.590904)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (0.105359, -0.200868, -0.590904)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=34735791872ns (30.826346)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=35111755672ns (10.176553)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=35111755672ns (0.204703)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=35111755672ns (0.154425)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (10.176553, 0.204703, 0.154425)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=35111755672ns (-0.037970)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=35111755672ns (0.014787)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=35111755672ns (-0.017985)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (-0.037970, 0.014787, -0.017985)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=35111755672ns (0.091311)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=35111755672ns (-0.197344)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=35111755672ns (-0.567132)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (0.091311, -0.197344, -0.567132)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=35111755672ns (30.835328)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=35472841576ns (10.176553)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=35472841576ns (0.198119)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=35472841576ns (0.148439)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (10.176553, 0.198119, 0.148439)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=35472841576ns (-0.037970)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=35472841576ns (0.014521)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=35472841576ns (-0.017719)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (-0.037970, 0.014521, -0.017719)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=35472841576ns (0.091311)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=35472841576ns (-0.200868)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=35472841576ns (-0.577320)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (0.091311, -0.200868, -0.577320)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=35472841576ns (30.832334)
Using west:
west build -b waveshare_rp2040_lcd_0_96 -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r2 -d build/waveshare_pico_10dof_imu_sensor-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_10dof_imu_sensor-helloshell -GNinja -DBOARD=waveshare_rp2040_lcd_0_96 -DSHIELD="waveshare_pico_10dof_imu_sensor_r2" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_10dof_imu_sensor-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h
hello - say hello
uart:~$ hello
Hello from shell.
uart:~$ hwinfo devid
Length: 8
ID: 0x8c998be1de969148
uart:~$ kernel version
Zephyr version 4.1.0
uart:~$ bridle version
Bridle version 4.1.0
uart:~$ bridle version long
Bridle version 4.1.0.0
uart:~$ bridle info
Zephyr: 4.1.0
Bridle: 4.1.0
uart:~$ device list
devices:
- clock-controller@40008000 (READY)
DT node labels: clocks
- reset-controller@4000c000 (READY)
DT node labels: reset
- snippet_cdc_acm_console_uart (READY)
DT node labels: snippet_cdc_acm_console_uart
- uart@40034000 (READY)
DT node labels: uart0 pico_serial rpipico_serial
- timer@40054000 (READY)
DT node labels: timer
- gpio@40014000 (READY)
DT node labels: gpio0
- adc@4004c000 (READY)
DT node labels: adc
- flash-controller@18000000 (READY)
DT node labels: ssi
- i2c@40048000 (READY)
DT node labels: i2c1 pico_i2c1 rpipico_i2c1
- vreg@40064000 (READY)
DT node labels: vreg
- rtc@4005c000 (READY)
DT node labels: rtc
- leds (READY)
- lps22hb@5c (READY)
DT node labels: wsptdis_sens_tp
- mpu9250@68 (READY)
DT node labels: wsptdis_sens_dof
uart:~$ history
[ 0] history
[ 1] device list
[ 2] bridle info
[ 3] bridle version long
[ 4] bridle version
[ 5] kernel version
[ 6] hwinfo devid
[ 7] hello
[ 8] hello -h
The Waveshare Pico Environment Sensor provides four on-shield sensors connected on I2C0.
uart:~$ i2c scan i2c@40048000
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
2 devices found on i2c@40048000
The I2C address
0x5c
is the STM LPS22HB [12], an air pressure and temperature sensor (TP).The I2C address
0x68
is the InvenSense MPU-9250 [14] with AK8963 [7], an motion and acceleration sensor (9-DOF) with 3-axis accelerometer, 3-axis gyroscope and 3-axis magnetometer (compass).
The “Who am I” register of the STM LPS22HB environmental sensor can read
from register 0x0f
and must be 0xb1
:
uart:~$ i2c read_byte i2c@40048000 5c 0f
Output: 0xb1
The “Who am I” register of the InvenSense MPU-9250 9-DOF sensor can read
from register 0x75
and must be 0x71
:
uart:~$ i2c read_byte i2c@40048000 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: (null)
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: (null)
LPS22HB (TP)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=457076700000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=457076700000ns (97.807176)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=458111600000ns (29.489999)
channel idx=14 press shift=7 num_samples=1 value=458111600000ns (97.802635)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=459521100000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=459521100000ns (97.801683)
MPU-9250 (9-DOF)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=34735791872ns (10.188524)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=34735791872ns (0.204703)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=34735791872ns (0.141855)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (10.188524, 0.204703, 0.141855)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=34735791872ns (-0.037571)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=34735791872ns (0.014787)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=34735791872ns (-0.018519)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (-0.037571, 0.014787, -0.018519)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=34735791872ns (0.105359)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=34735791872ns (-0.200868)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=34735791872ns (-0.590904)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (0.105359, -0.200868, -0.590904)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=34735791872ns (30.826346)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=35111755672ns (10.176553)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=35111755672ns (0.204703)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=35111755672ns (0.154425)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (10.176553, 0.204703, 0.154425)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=35111755672ns (-0.037970)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=35111755672ns (0.014787)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=35111755672ns (-0.017985)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (-0.037970, 0.014787, -0.017985)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=35111755672ns (0.091311)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=35111755672ns (-0.197344)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=35111755672ns (-0.567132)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (0.091311, -0.197344, -0.567132)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=35111755672ns (30.835328)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=35472841576ns (10.176553)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=35472841576ns (0.198119)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=35472841576ns (0.148439)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (10.176553, 0.198119, 0.148439)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=35472841576ns (-0.037970)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=35472841576ns (0.014521)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=35472841576ns (-0.017719)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (-0.037970, 0.014521, -0.017719)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=35472841576ns (0.091311)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=35472841576ns (-0.200868)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=35472841576ns (-0.577320)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (0.091311, -0.200868, -0.577320)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=35472841576ns (30.832334)
on standard 4㎆
revision
Using west:
west build -b waveshare_rp2040_plus -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r2 -d build/waveshare_pico_10dof_imu_sensor-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_10dof_imu_sensor-helloshell -GNinja -DBOARD=waveshare_rp2040_plus -DSHIELD="waveshare_pico_10dof_imu_sensor_r2" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_10dof_imu_sensor-helloshell flash
on extended 16㎆
revision
Using west:
west build -b waveshare_rp2040_plus@16mb -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r2 -d build/waveshare_pico_10dof_imu_sensor-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_10dof_imu_sensor-helloshell -GNinja -DBOARD=waveshare_rp2040_plus@16mb -DSHIELD="waveshare_pico_10dof_imu_sensor_r2" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_10dof_imu_sensor-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h
hello - say hello
uart:~$ hello
Hello from shell.
uart:~$ hwinfo devid
Length: 8
ID: 0x8c998be1de969148
uart:~$ kernel version
Zephyr version 4.1.0
uart:~$ bridle version
Bridle version 4.1.0
uart:~$ bridle version long
Bridle version 4.1.0.0
uart:~$ bridle info
Zephyr: 4.1.0
Bridle: 4.1.0
uart:~$ device list
devices:
- clock-controller@40008000 (READY)
DT node labels: clocks
- reset-controller@4000c000 (READY)
DT node labels: reset
- snippet_cdc_acm_console_uart (READY)
DT node labels: snippet_cdc_acm_console_uart
- uart@40034000 (READY)
DT node labels: uart0 pico_serial rpipico_serial
- timer@40054000 (READY)
DT node labels: timer
- gpio@40014000 (READY)
DT node labels: gpio0
- adc@4004c000 (READY)
DT node labels: adc
- flash-controller@18000000 (READY)
DT node labels: ssi
- i2c@40048000 (READY)
DT node labels: i2c1 pico_i2c1 rpipico_i2c1
- vreg@40064000 (READY)
DT node labels: vreg
- rtc@4005c000 (READY)
DT node labels: rtc
- leds (READY)
- lps22hb@5c (READY)
DT node labels: wsptdis_sens_tp
- mpu9250@68 (READY)
DT node labels: wsptdis_sens_dof
uart:~$ history
[ 0] history
[ 1] device list
[ 2] bridle info
[ 3] bridle version long
[ 4] bridle version
[ 5] kernel version
[ 6] hwinfo devid
[ 7] hello
[ 8] hello -h
The Waveshare Pico Environment Sensor provides four on-shield sensors connected on I2C0.
uart:~$ i2c scan i2c@40048000
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
2 devices found on i2c@40048000
The I2C address
0x5c
is the STM LPS22HB [12], an air pressure and temperature sensor (TP).The I2C address
0x68
is the InvenSense MPU-9250 [14] with AK8963 [7], an motion and acceleration sensor (9-DOF) with 3-axis accelerometer, 3-axis gyroscope and 3-axis magnetometer (compass).
The “Who am I” register of the STM LPS22HB environmental sensor can read
from register 0x0f
and must be 0xb1
:
uart:~$ i2c read_byte i2c@40048000 5c 0f
Output: 0xb1
The “Who am I” register of the InvenSense MPU-9250 9-DOF sensor can read
from register 0x75
and must be 0x71
:
uart:~$ i2c read_byte i2c@40048000 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: (null)
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: (null)
LPS22HB (TP)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=457076700000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=457076700000ns (97.807176)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=458111600000ns (29.489999)
channel idx=14 press shift=7 num_samples=1 value=458111600000ns (97.802635)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=459521100000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=459521100000ns (97.801683)
MPU-9250 (9-DOF)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=34735791872ns (10.188524)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=34735791872ns (0.204703)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=34735791872ns (0.141855)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (10.188524, 0.204703, 0.141855)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=34735791872ns (-0.037571)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=34735791872ns (0.014787)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=34735791872ns (-0.018519)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (-0.037571, 0.014787, -0.018519)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=34735791872ns (0.105359)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=34735791872ns (-0.200868)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=34735791872ns (-0.590904)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=34735791872ns, (0.105359, -0.200868, -0.590904)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=34735791872ns (30.826346)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=35111755672ns (10.176553)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=35111755672ns (0.204703)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=35111755672ns (0.154425)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (10.176553, 0.204703, 0.154425)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=35111755672ns (-0.037970)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=35111755672ns (0.014787)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=35111755672ns (-0.017985)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (-0.037970, 0.014787, -0.017985)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=35111755672ns (0.091311)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=35111755672ns (-0.197344)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=35111755672ns (-0.567132)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=35111755672ns, (0.091311, -0.197344, -0.567132)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=35111755672ns (30.835328)
uart:~$ sensor get mpu9250@68
channel type=0(accel_x) index=0 shift=5 num_samples=1 value=35472841576ns (10.176553)
channel type=1(accel_y) index=0 shift=5 num_samples=1 value=35472841576ns (0.198119)
channel type=2(accel_z) index=0 shift=5 num_samples=1 value=35472841576ns (0.148439)
channel type=3(accel_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (10.176553, 0.198119, 0.148439)
channel type=4(gyro_x) index=0 shift=5 num_samples=1 value=35472841576ns (-0.037970)
channel type=5(gyro_y) index=0 shift=5 num_samples=1 value=35472841576ns (0.014521)
channel type=6(gyro_z) index=0 shift=5 num_samples=1 value=35472841576ns (-0.017719)
channel type=7(gyro_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (-0.037970, 0.014521, -0.017719)
channel type=8(magn_x) index=0 shift=5 num_samples=1 value=35472841576ns (0.091311)
channel type=9(magn_y) index=0 shift=5 num_samples=1 value=35472841576ns (-0.200868)
channel type=10(magn_z) index=0 shift=5 num_samples=1 value=35472841576ns (-0.577320)
channel type=11(magn_xyz) index=0 shift=5 num_samples=1 value=35472841576ns, (0.091311, -0.200868, -0.577320)
channel type=12(die_temp) index=0 shift=5 num_samples=1 value=35472841576ns (30.832334)
Startup logging output on target
[00:00:00.002,000] <err> MPU9250: Invalid chip ID.
***** delaying boot 4000ms (per build configuration) *****
[00:00:00.244,000] <wrn> udc_rpi: BUS RESET
[00:00:00.329,000] <wrn> udc_rpi: BUS RESET
*** Booting Zephyr OS build v4.1.0… (delayed boot 4000ms) ***
Hello World! I'm THE SHELL … … …
uart:~$ █
Using west:
west build -b rpi_pico -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r1 -d build/waveshare_pico_10dof_imu_sensor-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_10dof_imu_sensor-helloshell -GNinja -DBOARD=rpi_pico -DSHIELD="waveshare_pico_10dof_imu_sensor_r1" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_10dof_imu_sensor-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h
hello - say hello
uart:~$ hello
Hello from shell.
uart:~$ hwinfo devid
Length: 8
ID: 0x8c998be1de969148
uart:~$ kernel version
Zephyr version 4.1.0
uart:~$ bridle version
Bridle version 4.1.0
uart:~$ bridle version long
Bridle version 4.1.0.0
uart:~$ bridle info
Zephyr: 4.1.0
Bridle: 4.1.0
uart:~$ device list
devices:
- clock-controller@40008000 (READY)
DT node labels: clocks
- reset-controller@4000c000 (READY)
DT node labels: reset
- snippet_cdc_acm_console_uart (READY)
DT node labels: snippet_cdc_acm_console_uart
- uart@40034000 (READY)
DT node labels: uart0 pico_serial rpipico_serial
- timer@40054000 (READY)
DT node labels: timer
- gpio@40014000 (READY)
DT node labels: gpio0
- adc@4004c000 (READY)
DT node labels: adc
- flash-controller@18000000 (READY)
DT node labels: ssi
- i2c@40048000 (READY)
DT node labels: i2c1 pico_i2c1 rpipico_i2c1
- i2c@40044000 (READY)
DT node labels: i2c0 pico_i2c pico_i2c0 rpipico_i2c rpipico_i2c0
- vreg@40064000 (READY)
DT node labels: vreg
- rtc@4005c000 (READY)
DT node labels: rtc
- leds (READY)
- lps22hb@5c (READY)
DT node labels: wsptdis_sens_tp
- mpu9250@68 (DISABLED)
DT node labels: wsptdis_sens_dof
uart:~$ history
[ 0] history
[ 1] device list
[ 2] bridle info
[ 3] bridle version long
[ 4] bridle version
[ 5] kernel version
[ 6] hwinfo devid
[ 7] hello
[ 8] hello -h
The Waveshare Pico Environment Sensor provides four on-shield sensors connected on I2C0.
uart:~$ i2c scan i2c@40048000
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
2 devices found on i2c@40048000
The I2C address
0x5c
is the STM LPS22HB [12], an air pressure and temperature sensor (TP).The I2C address
0x68
is the InvenSense ICM-20948 [10] with AK09916 [7], an motion and acceleration sensor (9-DOF) with 3-axis accelerometer, 3-axis gyroscope and 3-axis magnetometer (compass).
The “Who am I” register of the STM LPS22HB environmental sensor can read
from register 0x0f
and must be 0xb1
:
uart:~$ i2c read_byte i2c@40048000 5c 0f
Output: 0xb1
The “Who am I” register of the InvenSense ICM-20948 9-DOF sensor can read
from register 0x00
and must be 0xea
:
uart:~$ i2c read_byte i2c@40048000 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: (null)
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: (null)
LPS22HB (TP)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=457076700000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=457076700000ns (97.807176)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=458111600000ns (29.489999)
channel idx=14 press shift=7 num_samples=1 value=458111600000ns (97.802635)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=459521100000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=459521100000ns (97.801683)
MPU-9250 (9-DOF)
uart:~$ sensor get mpu9250@68
Sensor device unknown (mpu9250@68)
Using west:
west build -b rpi_pico/rp2040/w -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r1 -d build/waveshare_pico_10dof_imu_sensor-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_10dof_imu_sensor-helloshell -GNinja -DBOARD=rpi_pico/rp2040/w -DSHIELD="waveshare_pico_10dof_imu_sensor_r1" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_10dof_imu_sensor-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h
hello - say hello
uart:~$ hello
Hello from shell.
uart:~$ hwinfo devid
Length: 8
ID: 0x8c998be1de969148
uart:~$ kernel version
Zephyr version 4.1.0
uart:~$ bridle version
Bridle version 4.1.0
uart:~$ bridle version long
Bridle version 4.1.0.0
uart:~$ bridle info
Zephyr: 4.1.0
Bridle: 4.1.0
uart:~$ device list
devices:
- clock-controller@40008000 (READY)
DT node labels: clocks
- reset-controller@4000c000 (READY)
DT node labels: reset
- snippet_cdc_acm_console_uart (READY)
DT node labels: snippet_cdc_acm_console_uart
- uart@40034000 (READY)
DT node labels: uart0 pico_serial rpipico_serial
- timer@40054000 (READY)
DT node labels: timer
- gpio@40014000 (READY)
DT node labels: gpio0
- adc@4004c000 (READY)
DT node labels: adc
- flash-controller@18000000 (READY)
DT node labels: ssi
- i2c@40048000 (READY)
DT node labels: i2c1 pico_i2c1 rpipico_i2c1
- i2c@40044000 (READY)
DT node labels: i2c0 pico_i2c pico_i2c0 rpipico_i2c rpipico_i2c0
- vreg@40064000 (READY)
DT node labels: vreg
- rtc@4005c000 (READY)
DT node labels: rtc
- leds (READY)
- lps22hb@5c (READY)
DT node labels: wsptdis_sens_tp
- mpu9250@68 (DISABLED)
DT node labels: wsptdis_sens_dof
uart:~$ history
[ 0] history
[ 1] device list
[ 2] bridle info
[ 3] bridle version long
[ 4] bridle version
[ 5] kernel version
[ 6] hwinfo devid
[ 7] hello
[ 8] hello -h
The Waveshare Pico Environment Sensor provides four on-shield sensors connected on I2C0.
uart:~$ i2c scan i2c@40048000
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
2 devices found on i2c@40048000
The I2C address
0x5c
is the STM LPS22HB [12], an air pressure and temperature sensor (TP).The I2C address
0x68
is the InvenSense ICM-20948 [10] with AK09916 [7], an motion and acceleration sensor (9-DOF) with 3-axis accelerometer, 3-axis gyroscope and 3-axis magnetometer (compass).
The “Who am I” register of the STM LPS22HB environmental sensor can read
from register 0x0f
and must be 0xb1
:
uart:~$ i2c read_byte i2c@40048000 5c 0f
Output: 0xb1
The “Who am I” register of the InvenSense ICM-20948 9-DOF sensor can read
from register 0x00
and must be 0xea
:
uart:~$ i2c read_byte i2c@40048000 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: (null)
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: (null)
LPS22HB (TP)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=457076700000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=457076700000ns (97.807176)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=458111600000ns (29.489999)
channel idx=14 press shift=7 num_samples=1 value=458111600000ns (97.802635)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=459521100000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=459521100000ns (97.801683)
MPU-9250 (9-DOF)
uart:~$ sensor get mpu9250@68
Sensor device unknown (mpu9250@68)
Using west:
west build -b waveshare_rp2040_lcd_0_96 -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r1 -d build/waveshare_pico_10dof_imu_sensor-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_10dof_imu_sensor-helloshell -GNinja -DBOARD=waveshare_rp2040_lcd_0_96 -DSHIELD="waveshare_pico_10dof_imu_sensor_r1" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_10dof_imu_sensor-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h
hello - say hello
uart:~$ hello
Hello from shell.
uart:~$ hwinfo devid
Length: 8
ID: 0x8c998be1de969148
uart:~$ kernel version
Zephyr version 4.1.0
uart:~$ bridle version
Bridle version 4.1.0
uart:~$ bridle version long
Bridle version 4.1.0.0
uart:~$ bridle info
Zephyr: 4.1.0
Bridle: 4.1.0
uart:~$ device list
devices:
- clock-controller@40008000 (READY)
DT node labels: clocks
- reset-controller@4000c000 (READY)
DT node labels: reset
- snippet_cdc_acm_console_uart (READY)
DT node labels: snippet_cdc_acm_console_uart
- uart@40034000 (READY)
DT node labels: uart0 pico_serial rpipico_serial
- timer@40054000 (READY)
DT node labels: timer
- gpio@40014000 (READY)
DT node labels: gpio0
- adc@4004c000 (READY)
DT node labels: adc
- flash-controller@18000000 (READY)
DT node labels: ssi
- i2c@40048000 (READY)
DT node labels: i2c1 pico_i2c1 rpipico_i2c1
- i2c@40044000 (READY)
DT node labels: i2c0 pico_i2c pico_i2c0 rpipico_i2c rpipico_i2c0
- vreg@40064000 (READY)
DT node labels: vreg
- rtc@4005c000 (READY)
DT node labels: rtc
- leds (READY)
- lps22hb@5c (READY)
DT node labels: wsptdis_sens_tp
- mpu9250@68 (DISABLED)
DT node labels: wsptdis_sens_dof
uart:~$ history
[ 0] history
[ 1] device list
[ 2] bridle info
[ 3] bridle version long
[ 4] bridle version
[ 5] kernel version
[ 6] hwinfo devid
[ 7] hello
[ 8] hello -h
The Waveshare Pico Environment Sensor provides four on-shield sensors connected on I2C0.
uart:~$ i2c scan i2c@40048000
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
2 devices found on i2c@40048000
The I2C address
0x5c
is the STM LPS22HB [12], an air pressure and temperature sensor (TP).The I2C address
0x68
is the InvenSense ICM-20948 [10] with AK09916 [7], an motion and acceleration sensor (9-DOF) with 3-axis accelerometer, 3-axis gyroscope and 3-axis magnetometer (compass).
The “Who am I” register of the STM LPS22HB environmental sensor can read
from register 0x0f
and must be 0xb1
:
uart:~$ i2c read_byte i2c@40048000 5c 0f
Output: 0xb1
The “Who am I” register of the InvenSense ICM-20948 9-DOF sensor can read
from register 0x00
and must be 0xea
:
uart:~$ i2c read_byte i2c@40048000 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: (null)
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: (null)
LPS22HB (TP)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=457076700000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=457076700000ns (97.807176)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=458111600000ns (29.489999)
channel idx=14 press shift=7 num_samples=1 value=458111600000ns (97.802635)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=459521100000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=459521100000ns (97.801683)
MPU-9250 (9-DOF)
uart:~$ sensor get mpu9250@68
Sensor device unknown (mpu9250@68)
on standard 4㎆
revision
Using west:
west build -b waveshare_rp2040_plus -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r1 -d build/waveshare_pico_10dof_imu_sensor-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_10dof_imu_sensor-helloshell -GNinja -DBOARD=waveshare_rp2040_plus -DSHIELD="waveshare_pico_10dof_imu_sensor_r1" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_10dof_imu_sensor-helloshell flash
on extended 16㎆
revision
Using west:
west build -b waveshare_rp2040_plus@16mb -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r1 -d build/waveshare_pico_10dof_imu_sensor-helloshell bridle/samples/helloshell
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_10dof_imu_sensor-helloshell -GNinja -DBOARD=waveshare_rp2040_plus@16mb -DSHIELD="waveshare_pico_10dof_imu_sensor_r1" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_10dof_imu_sensor-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h
hello - say hello
uart:~$ hello
Hello from shell.
uart:~$ hwinfo devid
Length: 8
ID: 0x8c998be1de969148
uart:~$ kernel version
Zephyr version 4.1.0
uart:~$ bridle version
Bridle version 4.1.0
uart:~$ bridle version long
Bridle version 4.1.0.0
uart:~$ bridle info
Zephyr: 4.1.0
Bridle: 4.1.0
uart:~$ device list
devices:
- clock-controller@40008000 (READY)
DT node labels: clocks
- reset-controller@4000c000 (READY)
DT node labels: reset
- snippet_cdc_acm_console_uart (READY)
DT node labels: snippet_cdc_acm_console_uart
- uart@40034000 (READY)
DT node labels: uart0 pico_serial rpipico_serial
- timer@40054000 (READY)
DT node labels: timer
- gpio@40014000 (READY)
DT node labels: gpio0
- adc@4004c000 (READY)
DT node labels: adc
- flash-controller@18000000 (READY)
DT node labels: ssi
- i2c@40048000 (READY)
DT node labels: i2c1 pico_i2c1 rpipico_i2c1
- i2c@40044000 (READY)
DT node labels: i2c0 pico_i2c pico_i2c0 rpipico_i2c rpipico_i2c0
- vreg@40064000 (READY)
DT node labels: vreg
- rtc@4005c000 (READY)
DT node labels: rtc
- leds (READY)
- lps22hb@5c (READY)
DT node labels: wsptdis_sens_tp
- mpu9250@68 (DISABLED)
DT node labels: wsptdis_sens_dof
uart:~$ history
[ 0] history
[ 1] device list
[ 2] bridle info
[ 3] bridle version long
[ 4] bridle version
[ 5] kernel version
[ 6] hwinfo devid
[ 7] hello
[ 8] hello -h
The Waveshare Pico Environment Sensor provides four on-shield sensors connected on I2C0.
uart:~$ i2c scan i2c@40048000
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
2 devices found on i2c@40048000
The I2C address
0x5c
is the STM LPS22HB [12], an air pressure and temperature sensor (TP).The I2C address
0x68
is the InvenSense ICM-20948 [10] with AK09916 [7], an motion and acceleration sensor (9-DOF) with 3-axis accelerometer, 3-axis gyroscope and 3-axis magnetometer (compass).
The “Who am I” register of the STM LPS22HB environmental sensor can read
from register 0x0f
and must be 0xb1
:
uart:~$ i2c read_byte i2c@40048000 5c 0f
Output: 0xb1
The “Who am I” register of the InvenSense ICM-20948 9-DOF sensor can read
from register 0x00
and must be 0xea
:
uart:~$ i2c read_byte i2c@40048000 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: (null)
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: (null)
LPS22HB (TP)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=457076700000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=457076700000ns (97.807176)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=458111600000ns (29.489999)
channel idx=14 press shift=7 num_samples=1 value=458111600000ns (97.802635)
uart:~$ sensor get lps22hb@5c
channel idx=13 ambient_temp shift=7 num_samples=1 value=459521100000ns (29.499999)
channel idx=14 press shift=7 num_samples=1 value=459521100000ns (97.801683)
MPU-9250 (9-DOF)
uart:~$ sensor get mpu9250@68
Sensor device unknown (mpu9250@68)
More Samples
LPS22HB Pressure and Temperature Sensor
This sample shows how to use the Sensors API driver for the STM LPS22HB MEMS pressure sensor. See also Zephyr sample: LPS22HB Temperature and Pressure Sensor.
west build -b rpi_pico -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r2 -d build/waveshare_pico_10dof_imu_sensor-lps22hb zephyr/samples/sensor/lps22hb
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-lps22hb
west build -b rpi_pico -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r1 -d build/waveshare_pico_10dof_imu_sensor-lps22hb zephyr/samples/sensor/lps22hb
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-lps22hb
The Default Shield Sample
See also Waveshare Pico 10-DOF IMU Sensor Sample in Bridle.
west build -b rpi_pico -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r2 -d build/waveshare_pico_10dof_imu_sensor bridle/samples/waveshare_pico_10dof_imu_sensor
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor
west build -b rpi_pico -p -S usb-console --shield waveshare_pico_10dof_imu_sensor_r1 -d build/waveshare_pico_10dof_imu_sensor bridle/samples/waveshare_pico_10dof_imu_sensor
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor