Back
AI
AI
Sensors
Arduino

Raspberry Pi Security Camera
137 Views33 Likes0 Comments12/29/2025
Build a motion-detecting security camera with Raspberry Pi. Record video and send alerts on detection.
Code Examples
1 exampleGPIO LED Control
Python19 lines
led_control.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class="text-gray-class="text-purple-400">500 italic"># Raspberry Pi GPIO LED Control
import RPi.GPIO as GPIO
import time
LED_PIN = class="text-purple-400">18
GPIO.setmode(GPIO.BCM)
GPIO.setup(LED_PIN, GPIO.OUT)
try:
while True:
GPIO.output(LED_PIN, GPIO.HIGH)
print(class="text-green-class="text-purple-400">400">"LED ON")
time.sleep(class="text-purple-400">1)
GPIO.output(LED_PIN, GPIO.LOW)
print(class="text-green-class="text-purple-400">400">"LED OFF")
time.sleep(class="text-purple-400">1)
except KeyboardInterrupt:
GPIO.cleanup()Comments (0)
Please login to leave a comment
No comments yet. Be the first to comment!
K
keyestudio Robot
Creator
More from this author
AIESP32 Chatbot with Display
Build an AI chatbot using ESP32 with OLED display. Connect to cloud AI services for intelligent conv
22250
AIArm Robot with Vision
Add computer vision to your robot arm. Detect and pick up objects based on color or shape recognitio
445420
SensorsPressure Sensor Applications
Use pressure sensors for weight measurement and touch detection. Build scales, pressure mats, or for
377410
ArduinoSerial Communication Tutorial
Master serial communication between Arduino and computer. Send and receive data for monitoring and c
470220