I am a newbie and wonder if anyone can advise me please?
I am interfacing a GY-271 compass module compass to an ESP8266-01S and having problems getting any usable output.
I have several compass modules which work brilliantly with an ESP32. However when used with an ESP8266-01S the data output is either fixed values or small variation. i.e Azimuth varies only 20° or so in a whole circle - almost as if it cannot really see the compass module on the I2C bus...
By interchanging the compass modules with the working ESP32 I can rule out their failure.
I am using a very simple sketch with the QMC5883L Compass library included which works nicely for the ESP32. For the ESP8266-01S I have also included the Wire library and added;
“Wire.begin(0, 2);” to assign SDA to GPIO0 SCL to GPIO2
before
“compass.init();”
Thank you for taking the time to read this, any guidance would be greatly appreciated!