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.
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.
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.
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.