Created
November 27, 2016 01:36
-
-
Save westy48/549dcd0a6116c0f8a27df7dc79beb8b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import Python libraries | |
from gpiozero import LED, PWMLED, Button | |
import pygame.mixer | |
from pygame.mixer import Sound | |
import time | |
from signal import pause | |
pygame.mixer.init() | |
santa = Sound("Laugh.wav") | |
# Set the GPIO pins | |
led = PWMLED(24) | |
button = Button(3) | |
while True: | |
button.wait_for_press() | |
led.pulse(n=5) | |
santa.play() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment