Skip to content

Commit

Permalink
Update BHI260 Dev address
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Oct 9, 2023
1 parent 0bff124 commit 0ccabdf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
4 changes: 3 additions & 1 deletion examples/BHI260AP_6DoF/BHI260AP_6DoF.ino
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ void setup()

#ifdef BHY2_USE_I2C
// Using I2C interface
if (!bhy.init(Wire, BHI260AP_SLAVE_ADDRESS, BHI260AP_SDA, BHI260AP_SCL)) {
// BHI260AP_SLAVE_ADDRESS_L = 0x28
// BHI260AP_SLAVE_ADDRESS_H = 0x29
if (!bhy.init(Wire, BHI260AP_SLAVE_ADDRESS_L, BHI260AP_SDA, BHI260AP_SCL)) {
Serial.print("Failed to init BHI260AP - ");
Serial.println(bhy.getError());
while (1) {
Expand Down
4 changes: 3 additions & 1 deletion examples/BHI260AP_DebugInfo/BHI260AP_DebugInfo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ void setup()

#ifdef BHY2_USE_I2C
// Using I2C interface
if (!bhy.init(Wire, BHI260AP_SLAVE_ADDRESS, BHI260AP_SDA, BHI260AP_SCL)) {
// BHI260AP_SLAVE_ADDRESS_L = 0x28
// BHI260AP_SLAVE_ADDRESS_H = 0x29
if (!bhy.init(Wire, BHI260AP_SLAVE_ADDRESS_L, BHI260AP_SDA, BHI260AP_SCL)) {
Serial.print("Failed to init BHI260AP - ");
Serial.println(bhy.getError());
while (1) {
Expand Down
4 changes: 3 additions & 1 deletion examples/BHI260AP_Orientation/BHI260AP_Orientation.ino
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ void setup()

#ifdef BHY2_USE_I2C
// Using I2C interface
if (!bhy.init(Wire, BHI260AP_SLAVE_ADDRESS, BHI260AP_SDA, BHI260AP_SCL)) {
// BHI260AP_SLAVE_ADDRESS_L = 0x28
// BHI260AP_SLAVE_ADDRESS_H = 0x29
if (!bhy.init(Wire, BHI260AP_SLAVE_ADDRESS_L, BHI260AP_SDA, BHI260AP_SCL)) {
Serial.print("Failed to init BHI260AP - ");
Serial.println(bhy.getError());
while (1) {
Expand Down
4 changes: 3 additions & 1 deletion examples/BHI260AP_StepCounter/BHI260AP_StepCounter.ino
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ void setup()

#ifdef BHY2_USE_I2C
// Using I2C interface
if (!bhy.init(Wire, BHI260AP_SLAVE_ADDRESS, BHI260AP_SDA, BHI260AP_SCL)) {
// BHI260AP_SLAVE_ADDRESS_L = 0x28
// BHI260AP_SLAVE_ADDRESS_H = 0x29
if (!bhy.init(Wire, BHI260AP_SLAVE_ADDRESS_L, BHI260AP_SDA, BHI260AP_SCL)) {
Serial.print("Failed to init BHI260AP - ");
Serial.println(bhy.getError());
while (1) {
Expand Down
3 changes: 2 additions & 1 deletion src/bosch/SensorBhy2Define.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
#include <stdint.h>
#include <stdio.h>

#define BHI260AP_SLAVE_ADDRESS 0x28
#define BHI260AP_SLAVE_ADDRESS_L 0x28
#define BHI260AP_SLAVE_ADDRESS_H 0x29
#define BHY_PROCESS_BUFFER_SZIE 512

#define BHY2_RLST_CHECK(ret, str, val) \
Expand Down

0 comments on commit 0ccabdf

Please sign in to comment.