I had fun building a little circuit that would beep, blink an LED and write on an OLED display when anything moves in space. It comes with a nice data sheet that simplifies wiring. Sensor: red wire to Vbus on pico, yellow wire to GP28, gray wire to GND on pico, LED on Gnd Buzzer: GP14 to buzzer on Gnd Micropython: import machineimport utimefrom ssd1306 import SSD1306_I2Csensor_pir = machine.Pin(28, machine.Pin. IN, machine.Pin.PULL_DOWN)sda=machine.Pin(20)scl=machine.Pin(21 )i2c=machine.I2C(0, sda=sda, scl=scl, freq=400000)led = machine.Pin( 3, machine.Pin.OUT)oled = SSD1306_I2C(128, 32, i2c)buzzer = machine.Pin (14, machine.Pin.OUT)def pir_handler(pin): utime.sleep_ms(100) if pin.value() : print (i2c.scan()) oled.text('Motion detected!', 0, 0) oled.show() utime.sleep_ms(1000) for i in range (20): led.toggle() buzzer.toggle () utime.sleep_ms(100) utime.sleep_ms(100) oled.fill(0) oled.show ()sensor_pir.irq(trigger=machine.Pin.IRQ_RISING, handler=pir_handler)
Wireless Driveway Alarm System - Long Range 1/2 Mile with Solar Power & Weatherproof Design - Adjustable Sensitivities and Outdoor Motion Sensor for DIY Security Alert
11 Review
YoLink Smart Outdoor Motion Detector: 1/4 Mile Range LoRa-Powered Wireless Sensor for Driveway Alert, Trespassing Alarm, Remote Monitoring & Alerts - Alexa, IFTTT Compatible. Hub Required!
11 Review
π Chamberlain Group CWA2000 Chamberlain Driveway Alert: Enhanced Security in Sleek Black Design
10 Review
Optimized 433MHz Home Wireless PIR Infrared Motion Detector Sensor for Alarm System by KERUI
12 Review
2 Pack Battery And Charger Kit Bundle For Olympus Tough TG-Tracker, TG-5, TG-2IHS, TG-3, TG-4 Waterproof Digital Camera Includes 2 Replacement (1500Mah) LI-90B, LI-92B Batteries + Charger + More
43 Review
π TalentCell PB240A1 | 24V Lithium Ion Battery with 22400mAh Capacity | Rechargeable Power Pack for LED Light Strip, CCTV Camera, Smartphone & More
26 Review
Enhance Your Network Connection With Dingsun RJ45 Coupler - Compatible With Cat5, Cat5E, Cat6, And Cat7 Ethernet Cables (Black 10 Pcs)
35 Review
HUANUO Adjustable Laptop Stand Riser For Desk - Fits Up To 15.6 Inch Notebook, Mesh Ventilated Cooling With 8 Tilt Levels For Improved Airflow & Ergonomics
29 Review