-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the 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.
Bang puts your Arduino in charge with these badass features:
-
Shell Commands with Macros: Fire
BANG("echo Hello")to send!echo Helloto the host’s shell, getting results back. UseBANG_P(PSTR("date"))for flash memory orBANG_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 inarduino_exec.pyfor 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")orBANG("osascript -e 'tell application \"Music\" to play'"), reboot withBANG("reboot")(needssudo), or check host sleep status. -
Host Power: Access disk storage, fetch weather, control Hue lights, or run any script with
BANG("!...")orBANG("@macro"). - Lean and Mean: Runs in minimal RAM, built for Arduino’s tight constraints.
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! 😃
- About: Dive into Bang’s goals and tech details.
- Installation: Get Bang running on Arduino and host.
-
Usage: Master
BANG,@macro,!, and&commands. - Code Structure: Explore the library and Python agent.
-
Bang Class: Learn the
Bangclass and macro magic. -
Python Agent: Understand
arduino_exec.py’s!,&,@handling. -
Examples: Check out sketches like
upload.ino. -
Dynamic Uploading: Unleash
&sketch_name\npower. -
Security: Stay safe with
sudoand sanitization. - Troubleshooting: Fix serial, upload, or macro issues.
- Options: Tweak baud rates, ports, and streams.
- Performance: Boost serial and upload speed.
- Testing: Validate commands, uploads, and macros.
- Contributing: Join the Bang crew.
- License: MIT License details.
- FAQ: Quick answers to your questions.
- Changelog: Track Bang’s updates.
- Hit the Installation guide to set up Bang.
- Jump to Usage to fire off
BANG("echo Hello"),BANG("@play"), orBANG("&blink\n"). - Explore Dynamic Uploading to break the 32K barrier.
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 WorldfromBANG("echo Hello World"). - Triggering
@playto start music. - Confirmation of
BANG("&blink\n")uploadingblink.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!