Taking the Plunge

I’ve been considering getting a Raspberry Pi for awhile.  Several folks have asked me if I would port my Arduino Keyer code to it.  So I decided to take the plunge and acquire a Pi from Newark / Element 14, along with some “fixins”.  I got the Model A Pi, along with a WiFi dongle, and a cute little enclosure. IMG_4055

Big Things Come in Small Packages

I didn’t realize just how small the Pi was until I held one in my hand.  It’s just amazing this is a full blown computer.  It’s quite a leap from the VIC 20, the first computer I used 30 years ago as a teenager. IMG_4058

Raspbian Installation

The Raspberry Pi was surprisingly easy to fire up.  I bought a 16 GB SD card locally and burned a copy or Raspian on it.  After plumbing up a monitor to the HDMI port and connecting a USB keyboard and mouse, the unit booted right up, displaying messages familiar to anyone who runs Linux.  A few minutes later I entered startx and I was in XWindows.  Of course I just had to bring up a terminal window and verify this was really a ‘nix box and run top. IMG_4061

Nifty Little Pi Enclosure

Now that I have my Pi humming away, what projects should I do?  As I’ve mentioned a few folks have inquired about porting my keyer code to the Pi.  Googling around I found someone has ported the Wiring development platform , which is the basis for the Arduino environment, to the Raspberry Pi and aptly called it Wiring Pi.  Naturally it’s not 100% compatible and it’s not as easy as just plugging in the Arduino IDE and uploading compiled code.  I’m debating whether to take this approach of getting the keyer code to run under Wiring Pi, or just start from scratch with good old C and gcc for the compiler. I could get the core functionality going and then port over parts of the code from the Arduino for ancillary functions, if it makes sense.  Certain things don’t make sense to port, like the CW memories code.  On the Pi you don’t have to deal with EEPROM like you do on the Arduino.  Anything that needs to be persistent across reboots can just be written to a good old file on the file system.  While certain things like persistent memory and sound support are easier on a Pi, deterministic and precise timing, which is needed for CW timing, is challenging on a multi-tasking environment like Linux.  This realtime kernel may be just the ticket.

Compared to the Arduino, there aren’t a whole lot of interfacing pins on the Pi.  To really get the power of this board you need to do I2C.  I’m thinking about what it would take to port my antenna tuner to the Pi.  That project uses I2C for controlling many relays, but there is also a need to monitor the voltages of the SWR bridge.  The Pi doesn’t have this capability natively, so an I2C device would be needed to supply this functionality.

All in all the Raspberry Pi is a versatile and powerful little board.  To get my feet wet I think I’m going to write a little bare bones C and see if I can get a basic keyer working and see where this takes me.  This is going to be fun.

 

About these ads

3 responses to “Taking the Plunge

  1. Hello,

    I think it is the right direction. One thing to consider. The RasPi is just a low level computer and you will run into problem doing some rtos tasks. So I would think about the Banana Pi or the Cubietruck. These have an A20 processor. It has enough power to manage real time projects like CW.

    Hajo

  2. All of these SoC devices have terrible real-time performance and even worse GPIO speed. The bad GPIO performance is due in large part to the SoC parts being hobbled by on-die busses; e.g. the AMBI Bus (ask Wikipedia) is one example. Using or even trying to get around these on-die busses is a lesson in closed hardware and closed driver total lack of support – especially when the ARM IP is being realized in China. You are far better off hanging a little RISC micro-controller off the RPi than trying to fight with the RPi’s lousy GPIO speed and complete lack of deterministic timing, Or perhaps better-yet, just don’t bother with the RPi. BTW, you should have bought a Model-B+ RPi, not a Model-A.

  3. Sorry, I meant “AMBA Bus”, not AMBI Bus. AMBA stands for “Advanced Microcontroller Bus Architecture”.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s