Catalog / BeagleBone SBC Cheatsheet
BeagleBone SBC Cheatsheet
A comprehensive cheat sheet covering the BeagleBone Single Board Computer, including setup, GPIO, and common commands. This guide provides a quick reference for developers and hobbyists using BeagleBone for embedded projects.
Getting Started with BeagleBone
Initial Setup
Connecting to BeagleBone: Connect BeagleBone to your computer via USB. It should appear as a network drive. |
Accessing via SSH: Use an SSH client (e.g., PuTTY, Terminal) to connect to the BeagleBone. Default IP address is 192.168.7.2. The default username is |
Updating the System: After logging in, update the system using:
|
Installing Essential Tools: Install essential development tools:
|
Configuring Network: Edit |
Basic Commands
|
Print working directory. |
|
List directory contents. |
|
Change directory. |
|
Create a new directory. |
|
Remove a file. |
|
Text editors for file editing. |
Boot Configuration
U-Boot: BeagleBone uses U-Boot as its bootloader. Configuration files are located in |
Kernel Configuration: Kernel parameters can be modified via |
Device Tree Overlays: Device tree overlays ( |
Example Overlay Enable:
|
GPIO Programming
Accessing GPIO
GPIO Pins: GPIO pins can be accessed via the command line or through programming languages like Python. |
Using
|
Checking Pin State: Read the value of the GPIO pin:
|
Finding the GPIO Number: Each pin has a GPIO number associated with it. Use the BeagleBone Black System Reference Manual to find the number. |
Python GPIO Control
Installing Install the
|
Python Code Example:
|
Cleaning Up: Always unexport the pin when done:
|
Alternative Library - Adafruit BBIO: Another popular library is |
Device Tree Overlays for GPIO
Creating a Custom Overlay: Create a device tree source ( Compiling the Overlay: Use the device tree compiler to create the
|
Example DTS file:
|
Networking
Configuring Network Interfaces
Listing Network Interfaces: Use |
Editing Manually configure network interfaces by editing
|
Using For dynamic IP configuration, ensure
|
Wireless Setup
Connecting to Wi-Fi: Use |
Configuring Create/edit
|
Bringing up the interface:
|
Firewall Configuration
Using
Saving Rules: Save iptables rules using |
Using A more user-friendly firewall configuration tool:
|
Peripherals and Hardware
I2C Communication
Enabling I2C: Ensure I2C is enabled in
|
Detecting I2C Devices: Use
|
Using Read and write to I2C devices using |
UART Serial Communication
Accessing UART Ports: UART ports are available as |
Using Use
Then, configure minicom:
|
Example Set serial device to |
PWM
Accessing PWM: PWM functionality is available via device tree overlays. Enable PWM overlay in |
PWM Control: Control PWM parameters such as period and duty cycle via |
Example:
|