Close
0%
0%

Raspi Christmas Bell

Raspi rings Santas X-Mas bell for my son!

Similar projects worth following
My son is 2 years old. The idea: when we come home from church on 24th December then there will ring a bell in the living room and when we enter, no-one is inside... must have been Santa Clause... :-)

What you need:

- Raspi

- Servo Motor

- Python

- Tons of Lego Technik....

2015-12-19 20.49.03.mp4

Live and in action!

video/mp4 - 786.48 kB - 12/19/2015 at 23:02

Download

  • 1 × Raspi
  • 1 × A Bell
  • 1 × Servo Motor
  • 1 × A lot of Lego...

  • 1
    Step 1

    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)

    time.sleep(0.1)

    if i == 20:

    break

    i = i + 1

    p.stop()

    GPIO.cleanup()

    except KeyboardInterrupt:

    p.stop()

    GPIO.cleanup()

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates