Raspberry Pi - PWM Output
Identify the error in this code that controls LED brightness and fix it:
import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT) pwm = GPIO.PWM(18, 1000) pwm.ChangeDutyCycle(50) pwm.start(50) GPIO.cleanup()
