Below is a program to light an LED
Select the correct options to light the LED
print("Here we go! Press CTRL+C to exit")
try:
while 1:
if GPIO.input(butPin): # button is released
pwm.ChangeDutyCycle(dc)
GPIO.output(ledPin,
)
else: # button is pressed:
pwm.ChangeDutyCycle(100-dc)
GPIO.output(
, GPIO.HIGH)
time.sleep(0.075)
GPIO.output(ledPin, GPIO.LOW)
.sleep(0.075)