Files
2019-02-04 10:14:50 +01:00

23 lines
641 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#https://www.deviceplus.com/how-tos/add-siri-control-raspberry-pi-project/
#You can import any modules required here
import RPi.GPIO as GPIO #import GPIO module
import time
#This is name of the module it can be anything you want
moduleName = LED_on
#These are the words you must say for this module to be executed
commandWords = [turn, on, led]
#This is the main function which will be execute when the above command words are said
def execute(command):
LED = 11 # Set LED pin to pin 11
GPIO.setmode(GPIO.BOARD)
GPIO.setup(LED, GPIO.OUT) #configure LED as an output
print(\n)
print(LED is On.)