Issue with TWIST DEV-15083 and Alphanumeric COM-16916 : code semi-bricks SparkFun Qwiic Pro Micro

Hello,

Just getting into Arduino and I can get the Twist and Alphanumberic QWIICs to run by themselves, but I’m combining them with a HC-SR04 ultrasonic sensor and as soon as it uploads to the board, the board bricks. I am 100% certain I’m not running the wrong processor, I have the IDE set to 16 Mhz 5V and I haven’t modified the board to go down to 3.3. I’d appreciate any help. I’m not sure why my code kills the board.

The code is located at this pastebin, wasn’t sure if possible to post here cleanly.

https://pastebin.com/SAjjDkBi

Post a photo of the wiring/setup and maybe we can see something; off-hand the Twist&Alphanumeric run @ 3.3v, the ultrasonic runs @ 5v…you likely need to incorporate a level-shifter on one side or the other (pick to run @ 3.3v and shift up for the ultrasonic, or vice-versa for 5v https://learn.sparkfun.com/tutorials/qw … 1643964608).

Another thing to try is disabling the i2c pullup(s) on the Twist&Alphanumeric https://learn.sparkfun.com/tutorials/qw … e-overview and https://learn.sparkfun.com/tutorials/sp … okup-guide (check out the sections on pullups)

Okay, no picture yet. The VCC of the Ultrasonic sensor is connected to a constant high 5 v on the arduino 2 pin. Ground to ground on the arduino. Trig and Echo connect to 15 and 14 respectively. As for the voltages, does the Qwiic connector output 5V or 3.3V or does it matter based on board voltage? I thought over the Qwiic it automatically regulates to 3.3V. I did manage to get it working but even just using wire.begin caused strange things to occur with the ultrasonic sensor. It would either read slowly or not at all, or it would give nonsensical readings that the sensor isn’t capable of.

TS-Russell:
Post a photo of the wiring/setup and maybe we can see something; off-hand the Twist&Alphanumeric run @ 3.3v, the ultrasonic runs @ 5v…you likely need to incorporate a level-shifter on one side or the other (pick to run @ 3.3v and shift up for the ultrasonic, or vice-versa for 5v https://learn.sparkfun.com/tutorials/qw … 1643964608).

Another thing to try is disabling the i2c pullup(s) on the Twist&Alphanumeric https://learn.sparkfun.com/tutorials/qw … e-overview and https://learn.sparkfun.com/tutorials/sp … okup-guide (check out the sections on pullups)

Okay, now I can’t even get the board working again. I’m continually receiving this error.

Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding