hi. i just want to make library for some modules connected to esp32 via micropython.
i need to connect esp32 to Ethernet and couldn't find any library to do it.
so i guess i need to develop one
besides i use some libraries for temp and hum like aht10 and dht11 and I'm curious to know how exactly they work.
i googled it but couldn't find any useful explanation.
does anyone have any idea how to learn about how to make libraries for digital and analog modules? Any sources?
and I'm new to iot and micropython stuffs so need something for dummies i guess
can anyone tell me how to make library for any sensors
-
- Posts: 2
- Joined: Wed Apr 06, 2022 4:58 am
Re: can anyone tell me how to make library for any sensors
There is no straightforward tutorial. But I think it is possible to figure out if we study what's inside the existing micropython libraries.
Re: can anyone tell me how to make library for any sensors
It does depend on which board and version you're using, but when supported you get a `network.LAN` class. https://docs.micropython.org/en/latest/ ... k.LAN.htmlsepehr jami wrote: ↑Wed Apr 06, 2022 5:08 ami need to connect esp32 to Ethernet and couldn't find any library to do it.
There's a dht11 driver built-in to MicroPython.sepehr jami wrote: ↑Wed Apr 06, 2022 5:08 ambesides i use some libraries for temp and hum like aht10 and dht11 and I'm curious to know how exactly they work.
Are you asking how the driver works and how it's built in? Or how does the actual signalling to a dht11 module work?
For the former at least, see https://github.com/micropython/micropyt ... dht/dht.py and https://github.com/micropython/micropyt ... /dht/dht.c
This book might be helpful: https://www.oreilly.com/library/view/pr ... 491972724/sepehr jami wrote: ↑Wed Apr 06, 2022 5:08 amdoes anyone have any idea how to learn about how to make libraries for digital and analog modules? Any sources?