Years ago I bought myself a PiDuino from SK Pang with the original intention of using it as a power management board for my digital cluster project (ended up using a SleepyPi 2 in the end) and so hadn’t touched it for a few years, below are my notes on getting it working under Raspbian Buster on a RPi 3B+ in April 2020.
The original assembly guide is still relevant for soldering the board together, as well as the instructions for setting up and testing the software, especially Gordons instructions
In summary I performed the following:
Install Arduino and installed a modified version of avrdude (this might not be needed anymore as the standard avrdude could work, but didn’t test).
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install arduino
cd /tmp
wget http://project-downloads.drogon.net/gertboard/avrdude_5.10-4_armhf.deb
sudo dpkg -i avrdude_5.10-4_armhf.deb
sudo chmod 4755 /usr/bin/avrdude
Next regain control of the serial port by removing console=ttyAMA0,115200 from ‘/boot/cmdline.txt’
sudo nano /boot/cmdline.txt
We also need to edit ‘/boot/config’ and add a couple lines to reconfigure the serial port
sudo nano /boot/config.txt
And then add at the bottom:
dtoverlay=pi3-disable-bt
uart_enable=yes
Then stop the Systemd getty service and disable it from starting on boot with, followed by a reboot
sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl disable serial-getty@ttyAMA0.service
sudo reboot
Then following more instructions from Gordon, add the custom board and programmer entries into Arduino (you might be able to get away with just adding the custom programmer entry if you’re just interested in flashing the PiDuino using the RPi pins).
cd /tmp wget http://project-downloads.drogon.net/gertboard/boards.txt wget http://project-downloads.drogon.net/gertboard/programmers.txt cd /usr/share/arduino/hardware/arduino sudo mv boards.txt board.txt.bak sudo mv /tmp/boards.txt . sudo mv programmers.txt programmers.txt.bak sudo mv /tmp/programmers.txt .
With that all the software should be setup ready for use, connect the Piduino to the RPi header and fire up Arduino.
Set Tools -> Board -> Arduino Pro or Pro Mini (3.3v, 8 MHz) w/ ATmega328
Set Tools -> Programmer -> Raspberry Pi GPIO
You can now upload example programs such as ‘Blink’ to test that the upload functionality is working okay, be sure to use upload using programmer instead of just clicking the regular upload button
Select File -> Upload using programmer
When I did this I found that the example ‘blink’ project was running but very very slow, taking approximately 5 sec’s for the LED to blink. This can occur when the bootloader hasn’t been set, this is easy to fix by burning the boot loader.
Select Tools -> Burn Bootloader
With that the blink project should blink at the correct speed and everything is all setup and ready to go.