Skip to content
Trent M. Wyatt edited this page Apr 21, 2025 · 1 revision

Welcome to the Bang wiki!

Bang Wiki

Welcome to the Bang Wiki for Bang, the ultimate Arduino library that turns your microcontroller into a command-line king! Bang lets your Arduino blast shell commands, custom macros, and even new sketches to a PC, Mac, or Linux host via Serial-USB, grabbing results like a champ. With macros like BANG("@play") for custom shortcuts, BANG("echo Hello") for shell commands, and BANG("&blink\n") to reprogram itself, Bang obliterates the 32K flash limit, letting your application scale to epic proportions—each uploaded sketch just needs to fit in 32K. Include Bang in the new sketch, and it keeps dishing out commands, making your Arduino a self-rewriting legend. This wiki’s your roadmap to dominating with Bang, from macros to self-reprogramming, for Arduino hackers, IoT gurus, and boundary-breakers.

What Bang Does

Bang puts your Arduino in charge with these badass features:

  • Shell Commands with Macros: Fire BANG("echo Hello") to send !echo Hello to the host’s shell, getting results back. Use BANG_P(PSTR("date")) for flash memory or BANG_S(String("curl https://example.com")) for dynamic strings.
  • Custom Macros: Drop BANG("@play") to trigger a user-defined macro (e.g., play music), configured in arduino_exec.py for quick, reusable commands.
  • Self-Reprogramming: Slam BANG("&blink\n") to upload a new sketch (e.g., blink.ino), swapping the current one. With Bang in the new sketch, it can send more &, !, or @ commands, letting your app grow without limits—each subsystem fits in 32K flash.
  • Host Control: Play tracks with BANG("@play") or BANG("osascript -e 'tell application \"Music\" to play'"), reboot with BANG("reboot") (needs sudo), or check host sleep status.
  • Host Power: Access disk storage, fetch weather, control Hue lights, or run any script with BANG("!...") or BANG("@macro").
  • Lean and Mean: Runs in minimal RAM, built for Arduino’s tight constraints.

Why Bang Rocks

Bang’s a total game-changer! It hands your Arduino the host’s full power—internet, storage, dynamic code swaps—all wrapped in slick macros like BANG and @macro. Build a smart IoT gadget, a music player, or a self-evolving sketch—the possibilities are endless! 😃

Table of Contents

Getting Started

  1. Hit the Installation guide to set up Bang.
  2. Jump to Usage to fire off BANG("echo Hello"), BANG("@play"), or BANG("&blink\n").
  3. Explore Dynamic Uploading to break the 32K barrier.

Visuals

Bang’s output shines in the Serial Monitor, showing command results, macro triggers, or upload status. No visuals are in the repo yet, but imagine:

  • Serial Monitor printing Hello World from BANG("echo Hello World").
  • Triggering @play to start music.
  • Confirmation of BANG("&blink\n") uploading blink.ino. See Examples and Usage for screenshot placeholders.

For bugs or contributions, check the GitHub repository or Contributing. Let’s make your Arduino rewrite the rules!


Back to Top | Next: About

Clone this wiki locally