Waveshare Pico 10-DOF IMU Sensor
The Waveshare Pico 10-DOF IMU Sensor [9] shield is a pico sized multi sensor module designed for the Raspberry Pi Pico (BBE) or Raspberry Pi Pico 2 (BBE) 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 friendly-name = "WSP 10-DOF IMU: absolute air pressure with ambient temperature";
5 reg = <0x5c>;
6};
|
MPU-9250 [22] with AK8963 [15] (ICM-20948 [18] with AK09916 [15]) |
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 friendly-name = "WSP 10-DOF IMU: accelerometer, gyroscope, magnetometer (9-DOF)";
5 reg = <0x68>;
6 accel-fs = <2>;
7 accel-dlpf = "5.05";
8 gyro-fs = <250>;
9 gyro-dlpf = <5>;
10 gyro-sr-div = <9>;
11};
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 GP5 but not supported by driver:
5 * irq-gpios = <&rpipico_header RPIPICO_HEADER_R3_D5 GPIO_ACTIVE_HIGH>;
6 */
7};
|
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 GP3 but not supported by driver:
5 * irq-gpios = <&rpipico_header RPIPICO_HEADER_R3_D3 GPIO_ACTIVE_HIGH>;
6 */
7};
|
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 RPIPICO_HEADER_R3_D4 GPIO_ACTIVE_HIGH>; /* GP4 */
4 /*
5 * Frame synchronize connected at GP22 but not supported by driver:
6 * fsync-gpios = <&rpipico_header RPIPICO_HEADER_R3_D22 GPIO_ACTIVE_HIGH>;
7 */
8};
|
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 RPIPICO_HEADER_R3_D2 GPIO_ACTIVE_HIGH>; /* GP2 */
4 /*
5 * Frame synchronize connected at GP16 but not supported by driver:
6 * fsync-gpios = <&rpipico_header RPIPICO_HEADER_R3_D16 GPIO_ACTIVE_HIGH>;
7 */
8};
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_r2for 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.
west build -b rpi_pico/rp2040/bbe -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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense MPU-9250 [22] with AK8963 [15], 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 i2c1 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 i2c1 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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 Hazard3 RISC-V (RV32IMAC+)
west build -b rpi_pico2/rp2350a/hazard3_0/bbe -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
On ARM Cortex-M33
west build -b rpi_pico2/rp2350a/m33_0/bbe -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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense MPU-9250 [22] with AK8963 [15], 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 i2c1 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 i2c1 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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 ARM Cortex-M33
west build -b rpi_pico2/rp2350a/m33_0/w/bbe -p -S "usb-console wifi-ip" --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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense MPU-9250 [22] with AK8963 [15], 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 i2c1 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 i2c1 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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)
west build -b rpi_pico/rp2040/w/bbe -p -S "usb-console wifi-ip" --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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense MPU-9250 [22] with AK8963 [15], 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 i2c1 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 i2c1 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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)
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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense MPU-9250 [22] with AK8963 [15], 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 i2c1 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 i2c1 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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
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
on extended 16㎆ revision
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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense MPU-9250 [22] with AK8963 [15], 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 i2c1 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 i2c1 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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 Hazard3 RISC-V (RV32IMAC+)
west build -b waveshare_rp2350_can/rp2350a/hazard3_0 -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
On ARM Cortex-M33
west build -b waveshare_rp2350_can/rp2350a/m33_0 -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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense MPU-9250 [22] with AK8963 [15], 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 i2c1 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 i2c1 68 75
Output: 0x71
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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
*** Booting Zephyr OS build v4.5.0…***
Hello World! I'm THE SHELL … … …
uart:~$ █
west build -b rpi_pico/rp2040/bbe -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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense ICM-20948 [18] with AK09916 [15], 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 i2c1 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 i2c1 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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 Hazard3 RISC-V (RV32IMAC+)
west build -b rpi_pico2/rp2350a/hazard3_0/bbe -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
On ARM Cortex-M33
west build -b rpi_pico2/rp2350a/m33_0/bbe -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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense ICM-20948 [18] with AK09916 [15], 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 i2c1 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 i2c1 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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 ARM Cortex-M33
west build -b rpi_pico2/rp2350a/m33_0/w/bbe -p -S "usb-console wifi-ip" --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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense ICM-20948 [18] with AK09916 [15], 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 i2c1 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 i2c1 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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)
west build -b rpi_pico/rp2040/w/bbe -p -S "usb-console wifi-ip" --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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense ICM-20948 [18] with AK09916 [15], 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 i2c1 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 i2c1 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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)
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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense ICM-20948 [18] with AK09916 [15], 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 i2c1 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 i2c1 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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
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
on extended 16㎆ revision
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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense ICM-20948 [18] with AK09916 [15], 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 i2c1 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 i2c1 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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 Hazard3 RISC-V (RV32IMAC+)
west build -b waveshare_rp2350_can/rp2350a/hazard3_0 -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
On ARM Cortex-M33
west build -b waveshare_rp2350_can/rp2350a/m33_0 -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
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.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
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-port@0 (READY)
DT node labels: gpio0
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- 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 i2c1
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 i2c1
The I2C address
0x5cis the STM LPS22HB [20], an air pressure and temperature sensor (TP).The I2C address
0x68is the InvenSense ICM-20948 [18] with AK09916 [15], 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 i2c1 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 i2c1 68 0
Output: 0xea
uart:~$ sensor info
device name: lps22hb@5c, vendor: STMicroelectronics, model: lps22hb-press, friendly name: WSP 10-DOF IMU: absolute barometric air pressure with ambient temperature
device name: mpu9250@68, vendor: InvenSense Inc., model: mpu9250, friendly name: WSP 10-DOF IMU: accelerometer, gyroscope and magnetometer (9-DOF)
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)
Startup logging output on target
[00:00:00.002,000] <err> MPU9250: Invalid chip ID.
*** Booting Zephyr OS build v4.5.0…***
Hello World! I'm THE SHELL … … …
uart:~$ █
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/rp2040/bbe -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
On Hazard3 RISC-V (RV32IMAC+)
west build -b rpi_pico2/rp2350a/hazard3_0/bbe -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
On ARM Cortex-M33
west build -b rpi_pico2/rp2350a/m33_0/bbe -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
On ARM Cortex-M33
west build -b rpi_pico2/rp2350a/m33_0/w/bbe -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/rp2040/w/bbe -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 waveshare_rp2040_lcd_0_96 -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
on standard 4㎆ revision
west build -b waveshare_rp2040_plus -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
on extended 16㎆ revision
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-lps22hb zephyr/samples/sensor/lps22hb
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-lps22hb
On Hazard3 RISC-V (RV32IMAC+)
west build -b waveshare_rp2350_can/rp2350a/hazard3_0 -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
On ARM Cortex-M33
west build -b waveshare_rp2350_can/rp2350a/m33_0 -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/rp2040/bbe -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
On Hazard3 RISC-V (RV32IMAC+)
west build -b rpi_pico2/rp2350a/hazard3_0/bbe -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
On ARM Cortex-M33
west build -b rpi_pico2/rp2350a/m33_0/bbe -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
On ARM Cortex-M33
west build -b rpi_pico2/rp2350a/m33_0/w/bbe -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
west build -b rpi_pico/rp2040/w/bbe -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
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-lps22hb zephyr/samples/sensor/lps22hb
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-lps22hb
on standard 4㎆ revision
west build -b waveshare_rp2040_plus -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
on extended 16㎆ revision
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-lps22hb zephyr/samples/sensor/lps22hb
west flash -r uf2 -d build/waveshare_pico_10dof_imu_sensor-lps22hb
On Hazard3 RISC-V (RV32IMAC+)
west build -b waveshare_rp2350_can/rp2350a/hazard3_0 -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
On ARM Cortex-M33
west build -b waveshare_rp2350_can/rp2350a/m33_0 -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/rp2040/bbe -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
Startup logging output on target
[00:00:00.064,000] <dbg> MPU9250: ak8963_fetch_adj: Adjustment values 1756 1762 1698
*** Booting Zephyr OS build v4.5.0…***
[00:00:00.076,000] <inf> wsptdis_sample: MPU9250: Found device "mpu9250@68", getting sensor data
[00:00:00.076,000] <inf> wsptdis_sample: DOF: Configured for triggered sampling.
[00:00:00.076,000] <inf> wsptdis_sample: LPS22HB: Found device "lps22hb@5c", getting sensor data
[00:00:00.077,000] <inf> wsptdis_sample: TP: 99.52 AirPr. [hPa]
[00:00:00.077,000] <inf> wsptdis_sample: TP: 25.66 Temp. [C]
[00:00:00.084,000] <dbg> MPU9250: mpu9250_sample_fetch: magn_st2: 16
[00:00:00.084,000] <inf> wsptdis_sample: DOF: 0.365115 0.165199 10.096348 XYZ-Accel. [m/s/s]
[00:00:00.084,000] <inf> wsptdis_sample: DOF: -0.035306 0.012923 -0.010125 XYZ-Gyro. [rad/s]
[00:00:00.084,000] <inf> wsptdis_sample: DOF: 0.059704 -0.056384 -0.373560 XYZ-Magn. [uG]
[00:00:00.084,000] <inf> wsptdis_sample: DOF: 29.07 Temp. [C]
[00:00:02.078,000] <inf> wsptdis_sample: TP: 99.52 AirPr. [hPa]
[00:00:02.078,000] <inf> wsptdis_sample: TP: 25.75 Temp. [C]
[00:00:02.093,000] <dbg> MPU9250: mpu9250_sample_fetch: magn_st2: 16
[00:00:02.094,000] <inf> wsptdis_sample: DOF: 0.367509 0.175375 10.240000 XYZ-Accel. [m/s/s]
[00:00:02.094,000] <inf> wsptdis_sample: DOF: -0.038637 0.013722 -0.010258 XYZ-Gyro. [rad/s]
[00:00:02.094,000] <inf> wsptdis_sample: DOF: 0.057948 -0.047574 -0.365070 XYZ-Magn. [uG]
[00:00:02.094,000] <inf> wsptdis_sample: DOF: 29.07 Temp. [C]
… … …
west build -b rpi_pico/rp2040/bbe -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
Startup logging output on target
[00:00:00.001,000] <err> MPU9250: Invalid chip ID.
*** Booting Zephyr OS build v4.5.0…***
[00:00:00.003,000] <err> wsptdis_sample: MPU9250: Device "mpu9250@68" is not ready; check the driver initialization logs for errors.
[00:00:00.003,000] <inf> wsptdis_sample: LPS22HB: Found device "lps22hb@5c", getting sensor data