I’m trying to access the second I2C port on the Redboard Artemis (using pins 25 and 27) with the Sparkfun example sketches for the LSM9DS1. Any recommendations on how to use an I2C port other than the default for this board? I tried altering couple different locations in the core definitions to avail.
When I compile for the Artemis Nano, which uses the pins 25 and 27 by default, it works as expected.
#include "Wire.h"
#define mySDA D25
#define mySCL D27
TwoWire myWire(mySDA, mySCL);
void setup() {
// put your setup code here, to run once:
myWire.begin();
}
void loop() {
// put your main code here, to run repeatedly:
}
Thank you for the suggestion. I’m able to compile and upload with the TwoWire, however am receiving a Mbed OS Fault Handler Message in the serial port when the running the code. Any thoughts on what might be causing this? I appreciate any suggestions, even if it means changing the board definitions for the default pin assignments.