Closed pedronf65 closed 1 year ago
just made a pull request with the fix, this issue can be closed if pull request accepted
Currently we are not actively compatible with Arduino Nano 33 BLE, you can solve this problem by pre-compiling macros:
#if define() // Fill in the macro corresponding to Arduino Nano 33 BLE
// wake up command, refer to the chip datasheet
pinMode(PIN_WIRE_SDA, OUTPUT);
pinMode(PIN_WIRE_SCL, OUTPUT);
digitalWrite(PIN_WIRE_SCL, LOW);
digitalWrite(PIN_WIRE_SDA, HIGH);
delay(50);
digitalWrite(PIN_WIRE_SCL, HIGH);
digitalWrite(PIN_WIRE_SDA, LOW);
delay(50);
#else
// wake up command, refer to the chip datasheet
pinMode(SDA, OUTPUT);
pinMode(SCL, OUTPUT);
digitalWrite(SCL, LOW);
digitalWrite(SDA, HIGH);
delay(50);
digitalWrite(SCL, HIGH);
digitalWrite(SDA, LOW);
delay(50);
#endif
When compiling for the Arduino Nano 33 BLE:
c:\dev\dev-Arduino\libraries\DFRobot_MLX90614\DFRobot_MLX90614.cpp: In member function 'void DFRobot_MLX90614_I2C::enterSleepMode(bool)': c:\dev\dev-Arduino\libraries\DFRobot_MLX90614\DFRobot_MLX90614.cpp:157:13: error: 'SDA' was not declared in this scope pinMode(SDA, OUTPUT); ^~~ c:\dev\dev-Arduino\libraries\DFRobot_MLX90614\DFRobot_MLX90614.cpp:158:13: error: 'SCL' was not declared in this scope pinMode(SCL, OUTPUT); ^~~ c:\dev\dev-Arduino\libraries\DFRobot_MLX90614\DFRobot_MLX90614.cpp:158:13: note: suggested alternative: 'SCK' pinMode(SCL, OUTPUT); ^~~ SCK
For this Arduino they are defined like this:// Wire
#define PIN_WIRE_SDA (18u)
#define PIN_WIRE_SCL (19u)