Skip to content

Commit d6bf8fd

Browse files
committed
add test for issue #170
Output from running test: debian@beaglebone:~/ssh/adafruit-beaglebone-io-python$ sudo python test/issue170-pwm.py; journalctl -p debug -t python --since "1 min ago" -- Logs begin at Tue 2017-10-31 06:56:00 UTC, end at Tue 2017-10-31 07:36:39 UTC. -- Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: version <unknown> initialized Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: P9_14, 50.000000, 2000.000000, 1 Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: lookup_exported_pwm: couldn't find 'P9_14' Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: initialize_pwm: OK Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: set_pin_mode() :: Pinmux file /sys/devices/platform/ocp/ocp:P9_14 Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: set_pin_mode() :: Set pinmux mode to pwm for P9_14 Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: P9_14, /sys/devices/platform/ocp/48302000.epwmss/48302 Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: P9_14, /sys/devices/platform/ocp/48302000.epwmss/48302 Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_setup: P9_14 OK Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: call pwm_set_frequency(key=P9_14 freq=2000.000000) Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_set_frequency: P9_14 2000.000000 OK Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: call pwm_set_duty_cycle(key=P9_14 duty=50.000000) Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_set_duty_cycle: P9_14 50.000000 OK Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: call pwm_set_polarity(key=P9_14 polarity=1) Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_set_polarity: P9_14 1 OK Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: write(pwm->enable_fd, buffer=1, len=1) Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: P9_14 OK Oct 31 07:35:57 beaglebone python[1997]: [40B blob data] Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: P9_14, 50.000000, 2000.000000, 0 Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: lookup_exported_pwm: couldn't find 'P9_14' Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: set_pin_mode() :: Pinmux file /sys/devices/platform/ocp/ocp:P9_14 Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: set_pin_mode() :: Set pinmux mode to pwm for P9_14 Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: P9_14, /sys/devices/platform/ocp/48302000.epwmss/48302 Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: P9_14, /sys/devices/platform/ocp/48302000.epwmss/48302 Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_setup: P9_14 OK Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: call pwm_set_frequency(key=P9_14 freq=2000.000000) Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_set_frequency: P9_14 2000.000000 OK Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: call pwm_set_duty_cycle(key=P9_14 duty=50.000000) Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_set_duty_cycle: P9_14 50.000000 OK Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: call pwm_set_polarity(key=P9_14 polarity=0) Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_set_polarity: P9_14 0 OK Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: write(pwm->enable_fd, buffer=1, len=1) Oct 31 07:35:57 beaglebone python[1997]: Adafruit_BBIO: pwm_start: P9_14 OK Oct 31 07:35:57 beaglebone python[1997]: [40B blob data]
1 parent 5af654c commit d6bf8fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/issue170-pwm.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Adafruit_BBIO.PWM as PWM
2+
PWM.start("P9_14", 50, 2000, 1)
3+
PWM.cleanup()
4+
PWM.start("P9_14", 50, 2000, 0)
5+
PWM.cleanup()

0 commit comments

Comments
 (0)