So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Aleksandar Boskic
#86797 Hi all,

I'm trying to make my ESP-01 board to "talk" with GY-271 board based on QMC5883L. I'm trying to use I2C communication, but no luck at all. My idea is that data I read from GY-271 to send over Internet to my cloud server.

Did anybody have experience with this kind of concept, or devices or anything that he/she is willing to share.

Best regards,

_aleksa_
User avatar
By schufti
#86804 if "no luck" regards reading the chip:
there are differences between Hmc5883 and Qmc5883.
check in the used library if it uses the correct address.
in general, I use esp-01 with bme-280 for years to log weather data to thingspeak without problems.
User avatar
By Aleksandar Boskic
#86805 Hello schufti, thank You for quick reply.
Yes, I found that those two chips are different, but I could read the data from QMC using Arduino, but from ESP-01, I couldn't. Just default values, as the QMC is not present. I2C scanner find 0x0D as QMC address (it is OK, since EMC have another address), but still no luck.
If You have any other suggestions, please share.

Thank You in advance.
Best regards,
_aleksa_
User avatar
By schufti
#86817 on i2c there are no default values to read. either the chip answers correctly and the timing is right, then you get the response from the chip or you get an error from the communication routine.

did you see this topic?

for esp-01 I use Wire.begin(0, 2); // sda=gpio0 scl=gpio2,
the other way around there are side-effects like problems on booting (hanging) or the i2c device getting confused.