Iot Lecture 3
Iot Lecture 3
Digital Output
To write a pin high or low, use the GPIO.output([pin], [GPIO.LOW, GPIO.HIGH]) function.
For example, if you want to set pin 18 high, write:
Writing a pin to GPIO.HIGH will drive it to 3.3V, and GPIO.LOW will set it to 0V. For the
lazy, alternative to GPIO.HIGH and GPIO.LOW, you can use either 1, True, 0 or False to set a
pin value.
Syllabus
Syllabus
Syllabus
Syllabus
Step 2.
Syllabus
Step 4:
Syllabus
Ex: GPIO.input(18)
pi_pwm.start(duty_cycle)
pi_ChangeDutyCycle(new_duty_cycle)
pi_pwm.stop()
GPIO.VERSION()
GPIO.cleanup()
GPIO.setwarnings()
GPIO.wait_for_edge()
GPIO.add_event_detect()
GPIO.event_detected()