Update testaukset.py
This commit is contained in:
@@ -2,11 +2,17 @@ import time
|
||||
from grove.gpio import GPIO
|
||||
import RPi.GPIO as rGPIO
|
||||
|
||||
|
||||
|
||||
led = GPIO(5, GPIO.OUT)
|
||||
button = GPIO(6, GPIO.IN)
|
||||
|
||||
# create PWM instance
|
||||
pwm = rGPIO.PWM(12, 10) # pin 12
|
||||
pwmPin = 12
|
||||
pwm = rGPIO.PWM(pwmPin, 10)
|
||||
rGPIO.setmode(rGPIO.BCM)
|
||||
rGPIO.setup(pwmPin, rGPIO.OUT)
|
||||
|
||||
pwm.start(0)
|
||||
# 1000 Hz sound
|
||||
pwm.ChangeFrequency(1000)
|
||||
|
||||
Reference in New Issue
Block a user