Ultrasonic I2C module and using port B and Port C on Core2 for AWS with the included library
-
I have an Ultrasonic I2C module and am trying to use it with the AWS Core 2 device. It works fine on port a, but am trying to use port b or port c for the I2C commications. I am using the Arduino development environment and the code in place that works with port a is this:
SONIC_I2C sensor; sensor.begin(); newvalue = sensor.getDistance(); //this is returned in mm CoreS3.Lcd.printf("%.2f mm", newvalue);
I do not know how to do the same with the sensor plugged into Port B or Port C?
thanks for any assistance!
-
@tdahbura Deleted previous post with assertions that did not pan out in my tests!
Sorry -
@tdahbura You cant use it on port B because the port has one hardware fixed output pin and one hardware fixed input pin.
Port C is attached to dedicated UART pins.
For port B you need the PortB version of the sensor or use a the PaHub .