]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
[examples] added python3 env
authors-light <github@s-light.eu>
Mon, 1 Apr 2019 19:00:11 +0000 (21:00 +0200)
committers-light <github@s-light.eu>
Mon, 1 Apr 2019 19:00:11 +0000 (21:00 +0200)
examples/bbb_digitalio.py
examples/pb_digitalio.py

index 25496d5dc586ffe5a1c8e03a259c32476cbe99a2..9d8af71748f3b65b1d8966626693367995aa44b7 100755 (executable)
@@ -1,3 +1,6 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
 # Example of blinking LED on BeagleBone Black
 # https://www.adafruit.com/product/1876
 #
 # Example of blinking LED on BeagleBone Black
 # https://www.adafruit.com/product/1876
 #
@@ -5,6 +8,16 @@
 # 1) connect anode (+) lead of LED to P9.12 pin
 # 2) connect cathode (-) lead to 1K Ohm resistor
 # 3) connect that 1K Ohm resistor to DGND (P9.1)
 # 1) connect anode (+) lead of LED to P9.12 pin
 # 2) connect cathode (-) lead to 1K Ohm resistor
 # 3) connect that 1K Ohm resistor to DGND (P9.1)
+#
+# NOTE: the pin mode can be verified with the command line
+# utility config-pin on the BeagleBoard.org Debian image
+#
+# To verify the pin is in GPIO mode:
+# debian@beaglebone:~$ config-pin -q p9.12
+# P9_12 Mode: gpio Direction: out Value: 0
+#
+# To set pin to GPIO mode:
+# $ config-pin p9.12 gpio
 
 import time
 import board
 
 import time
 import board
index 884fc0000503045b6e85dc33499428b9d74b93df..0eb3a2b1139a496482a0c4ad744dc5972ea02712 100755 (executable)
@@ -1,3 +1,6 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
 # Example of blinking LED on PocketBeagle
 # https://www.adafruit.com/product/4179
 #
 # Example of blinking LED on PocketBeagle
 # https://www.adafruit.com/product/4179
 #