2 # -*- coding: utf-8 -*-
4 # SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
6 # SPDX-License-Identifier: MIT
8 # Example of blinking LED on BeagleBone Black
9 # https://www.adafruit.com/product/1876
11 # Wire the circuit as follows:
12 # 1) connect anode (+) lead of LED to P9.12 pin
13 # 2) connect cathode (-) lead to 1K Ohm resistor
14 # 3) connect that 1K Ohm resistor to DGND (P9.1)
16 # NOTE: the pin mode can be verified with the command line
17 # utility config-pin on the BeagleBoard.org Debian image
19 # To verify the pin is in GPIO mode:
20 # debian@beaglebone:~$ config-pin -q p9.12
21 # P9_12 Mode: gpio Direction: out Value: 0
23 # To set pin to GPIO mode:
24 # $ config-pin p9.12 gpio
30 print("hello blinky!")
32 led = digitalio.DigitalInOut(board.P9_12)
33 led.direction = digitalio.Direction.OUTPUT