I just recently created an article on how to access the onboard IMU of the Arduino Uno WiFi Rev2 at https://www.woolseyworkshop.com/2019/01/23/accessing-the-imu-on-the-new-arduino-uno-wifi-rev2/.
In a nutshell, you can select the SparkFun LSM6DS3 Breakout by SparkFun Electronics library from within the Library Manager and then change the constructor in the example sketches from
LSM6DS3 myIMU(SPI_MODE, SPIIMU_SS);
Hope this helps,
you sure SPIIMU_SS works in the arduino wifi rev2? I used this with no problems until i noticed that the IMU was interfering with pin 10 - delving a bit deeper, it seems that 10 is the default pin in the sparkfun library for the IMU. I couldnt find the the definition for SPIIMU_SS in any of the headers... i imagine that SPIIMU_SS is undefined and it resorts to default, pin 10. I will try and add portb3 directly and see if that releases pin 10 to be used as normal
edit: i found SPIIMU_SS in pins_arduino. So bit of a mystery why using this is interfering with pin 10. Any ideas? Pin 10 is the default for the CS pin in the sparkfun library