Academic
Posts
Flashing Arduino Uno via AVRDUDE and Programmer
Converting C code into machine readable .hex
Method 1 : Arduino CLI (unverified)
** Arduino CLI pulling the Arduino core and libraries into proj path**
-
Install the Arduino CLI
-
Create a directory and place authored
cfiles. Ex)~/MyProj/src/ - Ensure that the
arduino-cli corelibraries are up to date w/ command and installed (use only once)arduino-cli core update-index && arduino-cli core install arduino:avr - Compile and export hex
arduino-cli compile --fqbn arduino:avr:uno --export-binaries MyProj
Method 2 : Manual Method using avr-gcc
- Locate the Arduino core includes and compiled core archive ( or
compile yourself)
/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino - Copmpile your code (Ex file.c)
avr-gcc -c -mmcu=atmega328p -DF_CPU=16000000UL -I/path/to/cores/arduino -I/path/to/variants/standard file.c -o file.o - Link core libs and objects
avr-gcc -mmcu=atmega328p file.o /path/to/core.a -o file.elf - Produce hex file
avr-objcopy -O ihex -R .eeprom file.elf file.hex
Flashing Hardware using AVR Programmer
- Upload hex file to the arduino using AVRDUDE. The hex will likely be
in
MyProj/build/with the name likeMyProj.ino.hexorMyProj.hex.avrdude -c usbtiny -p atmega328p -U flash:w:MyProj.hex-c usbtiny: selecting programmer-p atmega328p: selecting device-U flash:w:PyProj.hex: all memory options allowed, do flash write
RoboCar Checkpoint 02 - Version 1
Current Checkpoint:
- Upload macro-level hardware plans here with requirements.
Figure 1V1.0 Requirements :
- RoboCar shall be be able to move forward, backward, left, and right. Tank controls are acceptable.
- RoboCar shall achieve a forward speed of ??
- RoboCar shall be able to accept (movement) commands from a remote PC with (???) allowable loss.
- RoboCar shall not be wired such that power or communication cables are tethering the vehicle.
- RoboCar shall come to a complete stop in (?? ms) when the ESTOP is pressed.
- RoboCar shall be be able to move forward, backward, left, and right. Tank controls are acceptable.
- ROS : turtle tut
Using the tutorial but trying turtlesim in a terminal using ‘ros2 run turtlesim turtlesimnode‘ results in
qt.qpa.xcb: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
solving this required a few more libraries and ensuring xauth is on my laptop! The libraries (X/Qt/xcb…) I had to install on the pi were "sudo apt install"…
- x11-apps
- libgl1
- libgl1-mesa-dri
- libgl1-mesa-glx
- libegl1-mesa
- libegl-mesa0
- libxcb1
- libx11-xcb1
- libxcb-xinerama0
- libxcb-icccm4
- libxcb-image0
- libxcb-keysyms1
- libxcb-randr0
- libxcb-render-util0
- libxcb-shm0
- libxcb-xkb1
- libxkbcommon-x11-0
and running a checky little ssh session ‘xeyes‘ for a simple test. After that, turtlesim worked!!
- ROS : controller control turtles through ssh (can kicked)
- Ard : Outline how to flash firmware
- For the firmware flash, I wanted to move away from the
Arduino IDE and attempt to flash using a programmer and
make/shell pipeline. For this, I opted to use the
AVR Programmer which has a healthy amount of documentation
around the PCB and programming along with the ability to
power the uno.
Figure 2 - Since I had installed the arduino IDE in the past,
I had the
ard-gcccompiler and libs installed. All I had to do was follow the process of generating a hex file outlined in another page [TODO]. - With the pipeline made, I created a small blink LED
test with the dir structure
|- bin | |- blink.elf | |- blink.hex | |- blink.o | | - Makefile | | - run.sh | | - src | | - blink.c
Be sure to look at my github for idea of the Makefile and shell BUT they should be a review from [TODO], the other file I posted today.
- For the firmware flash, I wanted to move away from the
Arduino IDE and attempt to flash using a programmer and
make/shell pipeline. For this, I opted to use the
AVR Programmer which has a healthy amount of documentation
around the PCB and programming along with the ability to
power the uno.
Next Checkpoints:
- (Arduino) Author a bare-bones, tank-style motor control system that accepts movement commands (hard-coded script til pi) using a TDD framework.
- (Pi) Switch ssh over to bluetooth from WLAN (and static address)
Concentrated and Sweet Hibiscus Tea Recipe

Recipe :
This is a sweet, concentrated, and strong hibiscus tea recipe I use for mixing with green or black tea throughout the week. It should be watered down but you can sip it if you’re bold enough!
Ingredients :
- 2cu Sugar (Brown)
- 6cu Water
- 1cu Hibiscus Flower (Rinsed)
Directions :
- Mix water and sugar into pot and bring to a boil.
- Turn off heat, place tea leaves into a strainer or cloth bag, and allow to soak for 5 minutes (longer for a stronger flavor).
- Remove leaves and allow to cool.
- Refrigerate and enjoy!
RoboCar Checkpoint 01 - Introductions
Previous Checkpoint: \( \nexists \)
Current Checkpoint:
- Setup the Raspberry pi \( \longrightarrow \) Ubuntu Server 24.04 Noble. \( \blacksquare \)
- Install ROS2 on the pi \( \longrightarrow \) ROS2 Jazzy Desktop \( \blacksquare \)
- Validated ROS2 install \( \longrightarrow \) Talk/Listener tutorial works \( \blacksquare \)
Notes:
- I don’t know how a desktop ROS will handle being on ubuntu server. Time will tell
Next Checkpoints:
- Upload macro-level hardware plans here
- ROS : turtle tut
- ROS : manual control turtles through ssh
- Ard : Outline how to flash firmware
Welcome back!
GREETING, it’s been roughly 4 years since I’ve created this website. I think its time I start posting on here :)
I hop you like it!