Ok, I got it to work nicely with the following setup:
- Mac with Mojave
- Arduino IDE 1.8.7 (fresh install)
- Added boards manager for esp8266
- Added board definitions for esp8266
- Picked NodeMCU 1.0 from the boards list
- Downloaded adafruit for bno055 library
- Downloaded adafruit unified sensor library
- Opened the sensorapi example
- Wired up GY-BNO055 to GND, 3.3V (to VIN on the GY-BNO055 board), SDA to D2 on NodeMCU, SCL to D1
- Change Port to the port where NodeMCU showed up /dev/cu.SLAB_USBtoUART (I had the driver for this board for the mac installed earlier)
- Compile and Upload
Voila - it worked after changing this call: Adafruit_BNO055 bno = Adafruit_BNO055(55,0x29); to refer to the 0x29 (i used i2cscanner code first to find this).
Thanks for all your help - would be great to get this working with arduino leonardo too.
After some twisting i got calibration of 3 1 3 for gyro, accelerometer and magnetometer and i saw the values for pitch roll and absolute heading relative to magentic earth field right away. It's great to get this orientation out of the box although i understand it works only for small amounts of pitch and roll.