Accelerometer and Gyroscope GY - 521 don´t work

I’m using the sensor: Accelerometer and Gyroscope GY - 521

.
With the Heltec CubeCell HTCC-AB01 board.
Unfortunately the only code I can find works only with Arduino and not with my CubeCell. I know it may be because not all libraries are compatible with CubeCell. Does anyone know how to change these libraries or know another code to make this sensor work for me. It also happens with other sensors I’m a bit frustrated.
I extracted the code from the page presented below. It changes the pins to make sense with the CubeCell board but it doesn’t work.

Any ideas or suggestions would be appreciated.