Test program for AM312 PIR works on Pi Pico W but not on Pi Pico 2 W #17466
Replies: 3 comments 15 replies
-
narrow in on the problem by looking at 'one change at a time' :
|
Beta Was this translation helpful? Give feedback.
-
I tried that code snippet on a PicoW with both a generator and a similar Sensor, and it worked well. Easy enough. So you could test if the sensor fails, or another Pin at the Pico. Be aware that the number supplied to Pin() is a GPIO number, not a board pin number. So board pin 2 is GPIO1, and GPIO2 is board pin 4. |
Beta Was this translation helpful? Give feedback.
-
If you have a series resistor between the sensor output and the GPIO input pin, keep in mind that the RP2350 has a tendency to latch up once in the HI state. One needs around 8kΩ or lower towards ground for the GPIO to be able to toggle back to LO. That's a different behavior than with the RP2040. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The test program below for the AM312 PIR works as expected on my Pi Pico W running on MicroPython 1.21.0 from Anvil Works, but shows no activity when run on my Pi Pico 2 W running MicroPython 1.25.0 from micropython.org. I've tried more basic test programs, different pins, and a spare AM312 with the same result. I've also tried using the built-in pull-down resistor and an external resistor with the same result. Any ideas what to try next would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions