Back
AI
AI
Sensors
Arduino

Raspberry Pi Home Server
445 Views19 Likes0 Comments12/29/2025
Set up a home server with Raspberry Pi. Host websites, file storage, and home automation services.
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
376410
ArduinoSerial Communication Tutorial
Master serial communication between Arduino and computer. Send and receive data for monitoring and c
470220