Last active
April 22, 2017 07:07
-
-
Save rgm3/b59842c7084595dd1ccd5673ea405e2b to your computer and use it in GitHub Desktop.
Problem with pigpio PWM duty cycle 0.0, failure in test_real_pins.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gpiozero | |
from gpiozero.pins.pigpiod import PiGPIOPin | |
# Place a jumper across these two pins. | |
# Physical pins # 13 and 15 on a B+ | |
test_pin = PiGPIOPin(27) | |
input_pin = PiGPIOPin(22) | |
test_pin.function = 'output' | |
test_pin.frequency = 100 | |
# I think something is wrong with this line | |
# see: http://abyz.co.uk/rpi/pigpio/python.html#set_PWM_dutycycle | |
# "Starts (non-zero dutycycle) or stops (0) PWM pulses on the GPIO." | |
test_pin.state = 0.0 | |
raw_input("do your measurements, replace the jumper, then press enter") | |
# test pin appears to be floating, not 0 as expected. | |
# input pin is at 3.3 volts | |
# Fails | |
assert input_pin.state == False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment