Closed jerabaul29 closed 3 years ago
Ok, looking here:
and there:
gives me good hope that this should be an easy fix.
Ok, got some help on the tracker website, it should be possible to set up a I2C with custom pins, looking at it now.
Ok, more problems coming up due to wrong pinmaps; taking the discussion on the Global Tracker issue though, feel free to help there.
Editing variant.h will get the second I2C device created, and the Arduino IDE compiles and links. But now there's a runtime mbed-OS error ++ MbedOS Error Info ++ Error Status: 0x80010130 Code: 304 Module: 1 Error Message: pinmap not found for peripheral Location: 0x26903 Error Value: 0x10 Current Thread: main Id: 0x10004C70 Entry: 0x28031 StackSize: 0x1000 StackMem: 0x100068F0 SP: 0x1000782C For more info, visit: https://mbed.com/s/error?error=0x800101 ... THING_PLUS -- MbedOS Error Info --
// Wire1 Pins
// end 2021-02-26 jry
Alright. I went back thru the targets and added wire interfaces for some of the Wire interfaces that were labelled on the board but not defined in the software. This means that @jry-slc Wire1 should be available on the thing plus without you needing to define it yourself.
I wanted to clarify how to define a custom Wire when we don't have one defined on the pins you would like already.
#define mySDA \\YOUR PIN HERE
#define mySCL \\YOUR PIN HERE
TwoWire myWire(mySDA, mySCL);
//Name this anything you would like, myWire chosen in this example
//No need to change VARIANT_WIRE_INTFCS this is used internally when defining built in wire interfaces
//No need to use MbedI2C type, TwoWire will work
//Make sure to begin before using
void setup() {
myWire.begin();
}
I think (to be confirmed there by the experts :) ) that I need to be able to access specifically Wire1 to be able to use the GPS on the Artemis Global Tracker (see issue https://github.com/sparkfunX/Artemis_Global_Tracker/issues/18 ).
In the core v 2.0.5, doing:
as was doable in the core v1 seems to be impossible: