September 24, 2013 · arduino gadgetoid gpio hacks paperduino piduino raspberrypi raspi rpi tricks

Pico PiDuino

Last week I've stumbled upon a great post about Arduino-like device - Pico PiDuino - by Gadgetoid. It is a really minature breadboard Atmel ATmega processor setup, allowing you to explore and learn a bit about the Arduino programming environment. To be honest, to make your own the Pico PiDuino all you need is a small breadboard, ATMega328P-PU with Arduino Bootloader, 16MHz Crystal Oscillator, few jumper wires, LEDs and 220-330 Ohm resistors for the LEDs. As Phil Howard states in his introduction article:

("¦) the Arduino-compatible we're going to build in this tutorial is absolutely, totally, irresponsibly barebones. In a proper breadboard Arduino build you should have a host of capacitors to decouple your power supply, and probably at least some protection circuitry between it and your Pi. If you're at all concerned about blowing up your Pi, read no further! ("¦)

That's very much true, as such a set-up might do some harm to your Pi, e.g. if you mismatch connections. Nevertheless, I've decided to give it a go.

I've bought for this a Gadgetoid recommended Bare Bones Breadboard Arduino Compatible Kit for a reasonable fiver from Phenoptix and started the assembly. Nothing difficult, especially that Phil created a very nice assembly tutorial. Having everything in place, with trembling heart, I've connected the processor to my RasPi. It worked! Nothing blew up, no resets, no lags! It was time for my first Arduino coding, keeping to Phil's tutorial for safety.

[![Pico PiDuino](https://blog.onetwentyseven001.com/content/images/2013/09/IMG_20130923_125336a-1024x762.jpg)](https://blog.onetwentyseven001.com/content/images/2013/09/IMG_20130923_125336a.jpg)
Pico PiDuino and Blu-Tack-legged Raspberry Pi
Before starting the actual coding, you have to download some additional software to compile and send the data to the chip. You don't have to install [Arduino IDE](https://arduino.cc/en/main/software "Arduino IDE") (which, by the way, doesn't want to run on my Pi, don't know why"¦). All you need is an Avrdude library, specially modified by [Gordon @ Drogon](https://projects.drogon.net/raspberry-pi/gertboard/arduino-ide-installation-isp/ "Arduino IDE Installation"). All the instructions are on the [Gadgetoid's website](https://pi.gadgetoid.com/article/building-the-pico-piduino "Building the Pico PiDuino - A cheap barebones Arduino compatible for your Pi"), I won't, don't want to and don't have to repeat them.
[![Pico PiDuino pinout from Gadgetoid](https://blog.onetwentyseven001.com/content/images/2013/09/pico-piduino-pinout.jpg)](https://pi.gadgetoid.com/piduino/pico-piduino)
Pico PiDuino pinout from Gadgetoid
I had some problems with the processor, especially with making it talk to Raspberry using serial connection. I don't know why, even after adding my user to dialout group, after checking the wires for the millionth time, it didn't want to work. I've spent three days, giving up hope, when finally, after [talking about it with Phil](https://pi.gadgetoid.com/article/programming-your-pico-piduino#comment-1055693962), it started working. All I had to do was to flash the program onto the processor, pull out and back in the voltage wire and it worked on the spot. I could communicate with the ATMega through my RPi's serial port!

It's really fun and worthwhile even to have a look at this little project. Why? As Phil says:

Because of their [ATMega/Arduino] flexibility and robustness, being able to program a microcontroller is a useful and rewarding skill to have, and it's fortunate that it's possible to leverage your Pi to get started quickly and cheaply with a trusty ATmega 328.

  • Learning to program an ATmega, or Arduino, will allow you to build much more specialist control systems which use less power, are much less complex, less prone to failure and more robust than the Pi. These are great for things that the Pi isn't necessary for.
  • Once you've grasped the basics and have a project in mind, you can even move on to playing with some of the brilliant official Arduino boards and all the programming skills you pick up will translate right over.
  • If you're wanting to produce your own product for sale, you can build your own hardware around an Arduino-compatible ATmega, program your software in the IDE and ship a finished design supporting an ATmega 328p or similar microprocessor.
  • It's a fun challenge for a weekend.
[![Pico PiDuino](https://blog.onetwentyseven001.com/content/images/2013/09/IMG_20130923_125344a-1024x1021.jpg)](https://blog.onetwentyseven001.com/content/images/2013/09/IMG_20130923_125344a.jpg)
Pico PiDuino clumsy set-up
Indeed, it is a challenge, a rewarding and great experience, and once you understand how Arduino works, you might even get a "proper" one and try yourself with it. The Pico PiDuino is good for flashing your work onto the processor for sure. To make it do more, you have to add several more components (and you can still keep it on a breadboard). Here are some examples of a full Arduino breadboard:

Have fun, and let me know if you've decided to give Pico PiDuino a try!

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket

Contact