Contributed by Marcel Isler
Only two axis are used, roll and pitch.
Pitch is not critical to polar alignment, but roll is (unless you are plate solving and syncing the mount).
The module is only supported on Arduino Mega out of the box, but you could probably make it work with the ESP32. Only 4 wires need to be connected: VCC, GND, SCL, and SDA. SCL is connected to pin 21 and SDA is connected to pin 20.
In order to use the digital level we need to enable it in the code, recompile and deploy. In one of the files
Configuration_local_<board>.hpp, search for
USE_GYRO_LEVEL and set it to 1.
If your level is mounted such that the roll and pitch axis are swapped, set the
GYRO_AXIS_SWAP variable to 1.
There are two new menu items in the LCD CAL menu, Roll Offset and Pitch Offset.
Before using the digital level, we need to tell the mount what horizontal is. To do this, set the mount on a level surface and level
the mount with the bubble level or just make sure the screws are all at the same point (fully unscrewed, for example). Then go to the LCD CAL menu and into the Roll Offset and hit SELECT, then confirm that it's level by selecting YES and then SELECT. This stores the current value as level. Do the same for the Pitch Offset.
When you setup the mount, go to the LCD CAL menu and Roll Offset and use the front M14s to make it level. Press the SELECT button to quit the menu. You will be prompted to save the value, select No. If you want to level in pitch, repeat, but this is not necessary.