o/~ talking to myself in public o/~
On Sun, 29 Mar 2020 23:24:46 -0400, in gmane.comp.hardware.beagleboard.user
Dennis Lee Bieber <[email protected]>
wrote:
>On Sun, 29 Mar 2020 17:53:51 -0700 (PDT), in
>gmane.comp.hardware.beagleboard.user Mala Dies
><functt-re5jqeeqqe8avxtiumwx3w-xmd5yjdbdmrexy1tmh2...@public.gmane.org> wrote:
>
>>It seems I cannot mux my pins.
>>
>
NOTE: I haven't actually run this with anything connected to the GPIO...
-=-=-=-
debian@beaglebone:~$ cat gpio_test.py
#!/usr/bin/env python3
import Adafruit_BBIO.GPIO as GPIO
import time
PIN = "P9_30"
GPIO.setup(PIN, GPIO.OUT)
GPIO.output(PIN, GPIO.LOW)
for t in range(10):
print("on %s" % t)
GPIO.output(PIN, GPIO.HIGH)
time.sleep(t)
print("off %s" % (10 - t))
GPIO.output(PIN, GPIO.LOW)
time.sleep(10 - t)
GPIO.cleanup()
debian@beaglebone:~$
-=-=-=-
That should toggle the GPIO in a 10 second cycle, starting with a short
on, long off, and ending with a long on, short off... 100 seconds total.
debian@beaglebone:~$ python3 gpio_test.py
on 0
off 10
on 1
off 9
on 2
off 8
on 3
off 7
on 4
off 6
on 5
off 5
on 6
off 4
on 7
--
Dennis L Bieber
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/k6q28ft47i2me2n3ikpeiq618254jpmihk%404ax.com.