Embedded coding help needed for an old padawan
- Following this open source example to read NiclaME sensors using i2c, found at , https://github.com/werner-duvaud/nicla-sense-me-i2c
One step of the procedure requires "Arduino IDE" to load code into the NiclaME to setup i2c address, sensor calib, etc. using nicla_sens_me_i2c.ino
I get several IDE warning messages about the header files, and the .ino errors out on compile.
C:\Users\GaryY\Data\Robotics\2025 Danger Will Robinson\Nicla_ME\nicla-sense-me-i2c-main\nicla-sense-me-i2c-main\arduino\nicla_sens_me_i2c\nicla_sens_me_i2c.ino: In function 'void setup()':
nicla_sens_me_i2c:213:14: error: 'NICLA_STANDALONE' was not declared in this scope
BHY2.begin(NICLA_STANDALONE);
#include "Arduino_BHY2.h"
#include "Wire.h"
Here is the void setup() in nicla_sens_me_i2c.ino
void setup() {
// Init
BHY2.begin(NICLA_STANDALONE);
Wire.begin(I2C_ADDRESS);
// I2C callbacks.
Wire.onReceive(receiveEvent);
Wire.onRequest(requestHandler);
}
I poked around in the Arduino_BHY2.h code, there is no 'NICLA_STANDALONE" defined. Is that what the error is about ?
2. Testing my Nicla ME using the Arduino IDE examples and the USB ports, it seems to work fine. The best open source code I've found so far has been this werner-duvaud package that I cant get past step 1 after trying out various different ways in the last 3 weeks.
Can Anyone recommend another open source code for using this Nicla ME over i2c or SPI direct to the Raspberry Pi ?
Thank you Obi Wan Kenobi , you're my only hope.