AZ-Touch MOD ESP32 ADC #558
-
|
First of all, awesome project, thanks for the whole thing First of all, what I plan to do: Now my request, as you can see in the title, I would like to use an ADC pin on the ESP32 to read in values (temperature) with something like this: KY-013 and send them every 5 seconds via MQTT, but since I'm a very big noob in this regard, I need help with that. mfg |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
|
Hi' @wenkman-007 I would instead go for a 1wire sensor e.g. DS18B20 or an i2c temp/humi sensor and do some custom code. I have a 1wire sample custom code lying around somewhere. Something I picked up either here in the Github discussions or in the Discord channel. I'll try and locate it, if you can't google your way to it 😉 |
Beta Was this translation helpful? Give feedback.
-
|
I have now decided on a DHT22. the DHT is connected to 3.3V, GND and datapin to GPIO32, high with a 4.7kOhm resistor. here is my code for it: |
Beta Was this translation helpful? Give feedback.
-
|
I have now added this for testing the answer is: {"Humi":6,"Temp":6} should actually be fast enough |
Beta Was this translation helpful? Give feedback.
-
6 millis - Wow, fast library indeed! 🚀 |
Beta Was this translation helpful? Give feedback.
No worries and welcome btw. 😎
You should be able to hook on to existing openHASP i2c bus and use this in your custom code. I've done exactly that in my proximity sensor custom code. openHASP utilizes the bus for the touch controller. Alternatively you could define your own secondary (wire1) i2c bus. You could use any (almost) free available pin/pins for i2c or 1wire connection. I don't have any insights on your devices pin config though.
I've no personal experience with 1wire devices. So far I've only used various i2c sensors.
I've located and uploaded two openHASP custom code examples other users have created and shared. You could check out these for inspiration. Uploaded to this Dropbox…