Category Archives: Raspberry Pi

Well, Arduino doesn’t “just work” even with the instructions I gave in my last post. If you don’t “prepare” your distro carefully, you’ll run into the comm problems I did (and thanks to Mark Amos, for pointers and encouragement!).

First, make sure you have a good power supply both for your Pi, and for your USB hub.

My belkin hub (one would think it would be good) would drop the mouse as soon as the Arduino IDE started up.

I ended up using a Staples hub (I can’t find it on their website, must be older.) powered off a 2 port Belkin USB power supply. I’m using a separate high amp Griffin USB power supply for the Pi.

I was having a problem in which I could download programs via AVRdude, but the Arduino IDE would have communication problems, and then the ports would be locked after Arduino was exited.

I believe the problem was due to me not setting the timezone, and date on the Pi. I think it didn’t like living in 1969. I don’t know if this was a problem for the software install, or the port handling by Arduino, but once I properly prepared, everything worked!

I’ve rebuilt the system several times and here are a few tips.

I’m using debian squeeze from the Raspberry pi site, and it defaults to a British keyboard layout. That’s fine if you’re there, but some of the following edits will be painful unless you change:

There’s a little hack you have to do to make the IDE work with UNO. I think it stems from the way the code checks for serial devices.

1) Before running the Arduino IDE, plug in your Arudino UNO.
2) Observe that there is now the device /dev/ttyACM0 writable by the dialout group of which pi is a member.
3) Make a hard link ttyS0 to that device. It’s a little easier if you cd to /dev.

Share this:

Well, I got my Raspberry Pi, and preparations are well underway to make an Arduino compatible clone that fits right on top.

Anool Mahidaria has completed an initial circuit design, and I’ve gotten some of the software set up. Lots of information out there that helped me figure out what to do, so I thought I’d compile it here in one place.

à la mode will connect via the uart on the GPIO, so we need to figure out how to enable serial communications, and get the Arduino environment installed.

Serial port: An embarrassment of riches?

The Pi’s Broadcom brain has a very rich set of peripherals, unfortunately it was hard for the Pi’s designers to route them all out to a connector. There’s a limited functionality min-uart that is very well supported, and at least in the debian image I’ve tried has drivers.

It doesn’t have hardware handshaking or DTR (needed for auto reset on the Arduino) but is supported at this stage so I think that’s what we’ll go with. There’s also a fully featured UART, and most of it’s compatible pins are brought out to the GPIO connector, but as far as I can tell, it’s not fully supported in the distributions generally available for the Pi.

That’s great, but it turns out that the Serial port is a little too well supported. (Caveat, I’m talking about the recommended Debian Squeeze image) You can log into it as a console! This, of course, prevents you from opening the port in a program (such as Arduino), so we need to disable logins on this port, as well as logging messages that go out. This post explains how to disable both.

Arduino IDE:

The Homelabs raspberry pi blog has good concise instructions for installing the Arduino IDE. The IDE is written in Java (based on Processing) and while Oracle doesn’t have an official Java for the ARM core in the Pi, the Open JDK has been ported. It doesn’t have a JIT (Just In Time Compiler) so it’s a little slower, but it works.

First grab the Arduino IDE code. (you can change the url if you want the latest)

Share this:

Lot’s of people are excited about the Raspberry Pi®, a complete computer for $25 (or $35 with ethernet).
The initial shipment is entirely sold out, and there are 200,000 more on order. Lots of people have been saying that this is the end of the Arduino, as it’s about the same cost, a full linux system with keyboard, mouse, and hdmi video output.

I think this is an oversimplification. Arduino is fantastic at interfacing to the physical world in a way that no linux (or Windows) PC could hope to approach at any cost.

The Pi does have a GPIO connector, but it pales in comparison to the humble Arduino. No built in PWM (servos anyone?) and no Analog to digital conversion.

Why throw the baby out with the bathwater? How about some delicious ice cream with your Raspberry Pi?
As a member of the amazing Open Source Hardare collective Wyolum.com, I’m working with Justin Shaw and Anool Mahidharia on “à la mode”: an Arduino clone specifically for the Raspberry Pi (That rendering above is courtesy of our fabulous EE Anool) . You can of course connect an Arduino to a Pi USB port, but when you want a turnkey solution, how about an Arduino compatible “plate” (what the Pi folks call shields) that fits right on top of the Raspberry Pi.

You can plug your existing shields right in, and you can even run the Arduino IDE on the Pi. Since the Pi’s core mission is to provide equal access to computing to all children, this will also give the kids the opportunity to mix it up “Arduino-style” with real world hardware.

We couldn’t have a vanilla add-on, so we added:

A battery backed real time clock: RTC: DS3231 (same as ChronoDot)

uSD card for logging

Socketed Atmel Atmega 328p in case you make a wiring mistake and need to replace it.

We’re sending off for prototype boards soon, so if you have feedback, let us know! Join the conversation at the Wyolum.com forums.