2 # -*- coding: utf-8 -*-
 
   4 # Example of blinking LED on BeagleBone Black
 
   5 # https://www.adafruit.com/product/1876
 
   7 # Wire the circuit as follows:
 
   8 # 1) connect anode (+) lead of LED to P9.12 pin
 
   9 # 2) connect cathode (-) lead to 1K Ohm resistor
 
  10 # 3) connect that 1K Ohm resistor to DGND (P9.1)
 
  12 # NOTE: the pin mode can be verified with the command line
 
  13 # utility config-pin on the BeagleBoard.org Debian image
 
  15 # To verify the pin is in GPIO mode:
 
  16 # debian@beaglebone:~$ config-pin -q p9.12
 
  17 # P9_12 Mode: gpio Direction: out Value: 0
 
  19 # To set pin to GPIO mode:
 
  20 # $ config-pin p9.12 gpio
 
  26 print("hello blinky!")
 
  28 led = digitalio.DigitalInOut(board.P9_12)
 
  29 led.direction = digitalio.Direction.OUTPUT