



# The board shows up as a USB network device. On Windows it is 192.168.7.2,
# on macOS/Linux 192.168.6.2. Default user 'debian', default password 'temppwd'.
ssh debian@192.168.7.2
# Change that password immediately on a board you keep:
passwd# The four on-board USER LEDs live under /sys/class/leds. usr0 normally shows
# a heartbeat - take it over, then toggle it by hand.
LED=/sys/class/leds/beaglebone:green:usr0
echo none | sudo tee $LED/trigger # stop the default heartbeat pattern
echo 1 | sudo tee $LED/brightness # LED on
echo 0 | sudo tee $LED/brightness # LED off#!/bin/bash
# blink.sh - blink on-board USER LED 0 once a second. Ctrl+C to stop.
LED=/sys/class/leds/beaglebone:green:usr0
echo none | sudo tee $LED/trigger
while true; do
echo 1 | sudo tee $LED/brightness
sleep 1
echo 0 | sudo tee $LED/brightness
sleep 1
done# An external LED on header pin P9_14. First set the pin to GPIO mode:
config-pin P9_14 gpio
# blink_ext.py - wiring: P9_14 -> 330 ohm resistor -> LED anode;
# LED cathode -> P9_1 (GND).
python3 - <<'PY'
import Adafruit_BBIO.GPIO as GPIO
import time
GPIO.setup("P9_14", GPIO.OUT)
try:
while True:
GPIO.output("P9_14", GPIO.HIGH); time.sleep(1)
GPIO.output("P9_14", GPIO.LOW); time.sleep(1)
finally:
GPIO.cleanup()
PY