This program written with Arduino Code running on ESP8266 (Wemos D1) is just a test to access, read status and control Tuya compatible WiFi Smart Devices (Plugs, Switches, Lights, Window Covers, etc.) ...
The MT6701 is an easy to program magnetic rotary position sensor with a high-resolution 12-bit analog, PWM, UVW, ABZ. With SPI and I2C output is 14 bit. They should provide magnetic button ...