targetblank / micropython_ahtx0

MicroPython driver for the AHT10 and AHT20 temperature and humidity sensors.
MIT License
32 stars 8 forks source link

I2C->SoftI2C, typos fixed, black formatting #1

Closed andypiper closed 2 years ago

andypiper commented 2 years ago

I've successfully used this with the Adafruit AHT20 StemmaQT/Qwiic board, and an ESP32 running MicroPython 1.18.

In doing so:

andypiper commented 2 years ago

Just re-checked my notebook, and I believe the MQTT issue I mentioned can be fixed as follows (the umqtt.robust thing is not necessary):

# needs non-zero keepalive for mosquitto 2.0.12+
c = MQTTClient("umqtt_client", "hostname", keepalive=1)
andypiper commented 2 years ago

Now added the above MQTT fix to the PR, and also spotted a mistake I'd left in the deepsleep sample, resolved.

andypiper commented 2 years ago

Closing this as I'm not sure it's valid; will open a new PR.

targetblank commented 2 years ago

Hi @andypiper, you already closed the PR, but do you have any reference regarding I2C deprecation and this SoftI2C? Fixing typos and formatting is a good idea anyway :-)

andypiper commented 2 years ago

So I think it was a misunderstanding on my part, of a message that came out of the build on MicroPython 1.18. A comment was left on my blog post about it. I was going to dig into this to make sure I was getting this right before re-sending something. Feel free to take a look if you know more about I2C than I do :-) I know the MQTT thing is valid as a thing to update.

BTW thank you for looking at this, I'm excited to help out here if I can - documenting work with an ESP32-C3 board at the moment.