Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: nano-33-ble IMU sample rates #59

Merged
merged 1 commit into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: nano-33-ble IMU sample rates
  • Loading branch information
ysoldak committed Feb 1, 2025
commit 6ca79179031653b7fefee163ea9e501654bb4b50
6 changes: 3 additions & 3 deletions src/orientation/imu_nano-33-ble.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func NewIMU() *IMU {
func (imu *IMU) Configure() {
// Configure I2C
machine.I2C1.Configure(machine.I2CConfig{
Frequency: machine.TWI_FREQ_100KHZ,
Frequency: 100 * machine.KHz,
SDA: machine.SDA1_PIN,
SCL: machine.SCL1_PIN,
})
Expand All @@ -35,9 +35,9 @@ func (imu *IMU) Configure() {
imu.device = lsm9ds1.New(machine.I2C1)
imu.device.Configure(lsm9ds1.Configuration{
AccelRange: lsm9ds1.ACCEL_4G,
AccelSampleRate: lsm9ds1.ACCEL_SR_952,
AccelSampleRate: lsm9ds1.ACCEL_SR_119,
GyroRange: lsm9ds1.GYRO_500DPS,
GyroSampleRate: lsm9ds1.GYRO_SR_952,
GyroSampleRate: lsm9ds1.GYRO_SR_119,
MagRange: lsm9ds1.MAG_4G,
MagSampleRate: lsm9ds1.MAG_SR_80,
})
Expand Down
2 changes: 1 addition & 1 deletion src/orientation/imu_xiao-ble.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewIMU() *IMU {
func (imu *IMU) Configure() {
// Configure I2C
machine.I2C1.Configure(machine.I2CConfig{
Frequency: machine.TWI_FREQ_100KHZ,
Frequency: 100 * machine.KHz,
SDA: machine.SDA1_PIN,
SCL: machine.SCL1_PIN,
})
Expand Down