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 . -
@ajb2k3 thanks.
I did not there was a different port version of the sensor?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login