-
Notifications
You must be signed in to change notification settings - Fork 0
Compiling Arduino Sketch on Raspberry Pi
AJ but at Work edited this page Jun 4, 2025
·
9 revisions
- Create a new folder and a sketch.ino. Remember, the folder name must match the sketch name!
- Create a script file named something like
jbus.sh - Populate with the following:
PORT="/dev/ttyASA"
SKETCH_DIR="/home/ajrob/Desktop/XT7_RT/XT7_Arduino/Jbus_A"
BUILD_DIR="/home/ajrob/Desktop/XT7_RT/XT7_Arduino/Jbus_A/build"
FQBN="arduino:avr:nano"
# Compile
arduino-cli compile --fqbn $FQBN --build-path $BUILD_DIR $SKETCH_DIR
# Upload
arduino-cli upload --fqbn $FQBN -p $PORT --input-dir $BUILD_DIR --verbose
Make sure you cd into the proper directory containing your script file
chmod +x jbus.sh
In the proper directory, just bash: ./jbus.sh