arduino-libraries / Arduino_LSM6DS3

LSM6DS3 Library for Arduino
GNU Lesser General Public License v2.1
30 stars 31 forks source link

IMU freezing up when digital pin 19/PB09 used on Nano 33 IoT #39

Open augustluhrs opened 11 months ago

augustluhrs commented 11 months ago

Hello!

Ran into some strange behavior that probably has a very obvious explanation, but figured I'd post here in case someone else was looking for a solution.

Have a very simple IMU sketch running on my nano, but was running into an issue where anytime the IMU functions were called in my loop(), the sketch would freeze and stop running.

After verifying the IMU worked with an example sketch, I commented out everything unrelated to the IMU and brought them back one at a time, realizing that the freeze would only occur if I had declared digital pin 19 to be OUTPUT in my setup.

Didn't do a thorough test of other pins besides verifying that pins 10-12 still work as output. Tried looking into datasheets for the IMU and the nano, but besides knowing digital pin 19 is port PB09, didn't see anything that seemed to be the clear reason. I'm guessing the IMU needs that pin? Just weird that I haven't seen that warning in the library or these issues -- is there something else that I could be doing wrong perhaps?