我之前用过Arduino Uno的老式9轴运动盾牌,它工作得很好,但最近买了一个新版本的9轴运动盾牌,它只返回零,不改变角度。看起来中断和复位引脚是不同的。这是不是意味着我不能再用Arduino Uno的护盾了?我使用的是NineAxesMotion库(https://github.com/arduino-org/arduino-library-nine-axes-motion)。
发布于 2019-11-15 01:47:05
如果不知道您正在使用的主板版本的详细信息,我无法给您一个明确的答案。
如果两个版本都作为Arduino防护罩出售,则它们必须与Arduino硬件兼容。
因此,如果你说两个版本之间的管脚发生了变化,如果硬件正常,那么只需改变库代码中的管脚编号即可。
//GPIO pins used for controlling the Sensor
#define RESET_PIN 4 //GPIO to reset the BNO055 (RESET pin has to be HIGH for the BNO055 to operate)
#if defined(__AVR_ATmega32U4__) //Arduino Yun and Leonardo
#define INT_PIN 4 //GPIO to receive the Interrupt from the BNO055 for the Arduino Uno(Interrupt is visible on the INT LED on the Shield)
#elif defined(ARDUINO_ARCH_SAM) //INT_PIN is the interrupt number not the interrupt pin
#define INT_PIN 2
#elif defined(ARDUINO_ARCH_SAMD)
#define INT_PIN 7
#else
#define INT_PIN 0
#endifhttps://stackoverflow.com/questions/58860556
复制相似问题