Raspi rings Santas X-Mas bell for my son!
Not a member? You should Sign up.
Already have an account? Log in.
To make the experience fit your profile, pick a username and tell us what interests you.
What you need:
- Raspi
- Servo Motor
- Python
- Tons of Lego Technik....
video/mp4 - 786.48 kB - 12/19/2015 at 23:02
Python Code:
import RPi.GPIO as GPIO
import time
servoPIN = 17
GPIO.setmode(GPIO.BCM)
GPIO.setup(servoPIN, GPIO.OUT)
p = GPIO.PWM(servoPIN, 50) # GPIO 18 als PWM mit 50Hz
p.start(2.5) # Initialisierung
i = 0
try:
while True:
p.ChangeDutyCycle(5)
time.sleep(0.1)
p.ChangeDutyCycle(2.5)
if i == 20:
break
i = i + 1
p.stop()
GPIO.cleanup()
except KeyboardInterrupt:
View all instructions
Create an account to leave a comment. Already have an account? Log In.
Huang Jin
hIOTron
Naman Chauhan
ed
Become a member to follow this project and never miss any updates
Yes, delete it Cancel
You are about to report the project "Raspi Christmas Bell", please tell us the reason.
Your application has been submitted.
Are you sure you want to remove yourself as a member for this project?
Project owner will be notified upon removal.