Replies: 2 comments 2 replies
-
I had a quick look through: When I have used them I was only looking for a low on the output, which I invert before using |
Beta Was this translation helpful? Give feedback.
-
I doubt that anyone has written a driver for this device as there is really no need. It's basically an electronic switch. I suspect there may be a bug in that C code which is rather complicated. Debouncing is normally only required for mechanical switches. There is clearly no relay on the device which is all electronic. Interrupts are overcomplicated for a device where 100ms of latency would pass un-noticed. Your approach of inverting the signal ad using it to wake the device soundsfine. |
Beta Was this translation helpful? Give feedback.
-
Hi,
This is not a MicroPython question per se, but it is related. MicroPython is able to make something work that I can't. I figured someone here may have an insight as to why.
I'm using the very popular am312 PIR sensor with an ESP32. My application is an ESP-IDF/FreeRTOS app written in C.
The am312 falsely reports motion at random. Even if the sensor is completely covered, it still says motion is detected.
With MicroPython on an ESP32, I've never had any problems with these devices. But they obviously should work because MicroPython itself is written in C.
So, can anyone point me to MicroPython source code for these kinds of sensors? I'm clearly missing something in my implementation.
Here is the code if you want to take a look and make suggestions.
Any suggestions?
Thank you,
-T
Beta Was this translation helpful? Give feedback.
All reactions