Arduino Mega 2560

I’ve recently purchased an Arduino Mega 2560 R3 development board.

It’s in some ways more powerful than the Raspberry Pi as it has analogue inputs, more GPIO’s and less overhead – in that it doesn’t run Linux, it doesn’t have an IP stack, it doesn’t have HDMI output etc. Its just a microcontroller and a bunch of pins that you program using C++

I’m actually preferring it to the Pi for electronic interfacing, as “it just works” as they say in Apple land. There’s no messing around with device file permissions, drivers or a rubbish USB subsystem and iffy power supplies – you can use a 9V battery, USB power from a PC or anything that can supply 5V/500mA or more down a barrel connector!

Gadgets On Order

I’ve been trawling through ebay China (just found the new “Worldwide” flag!) for fun components to experiment with my Raspberry Pi. I must say though, the “Best Offer” function is pointless, the sellers just decline your offer and counter offer for about 1% less than the Buy It Now price.

I got a PAM8403 stereo amplifier to replace the crumby one I’ve got in my radio project at the moment, I want to solder on some pin headers so I can unplug the speakers, USB power and 3.5mm audio jack when I need to, also I believe it has an all-in-one volume/power knob instead of two separate ones, £4.27 for two.

Internet Radio Project Part 3

I’ve updated the python code having now migrated to RPIO for the GPIO control as its interrupt and debouncing setup is more complete as of v0.10.1 than GPIO 0.5.0a, and should soon make it into the Raspbian repositories.

So now you can find the code, including init script and Fritzing breadboard file, here

Functionality-wise it now does:

  • Display of band+track or radio station on LCD whilst playing, NTP date+time whilst stopped (may add RSS feed)
  • Button pauses/plays when pressed or stops playback and switches to clock mode when held down for a second, playback can be resumed with another press
  • MPD runs locally and fetches MP3’s and radio playlists over NFSv4 from fileserver, should also work for local files on sdcard or usb drive
  • LCD also reflects the status from external MPC clients like gmpc or MPDroid
  • Volume control is handled via hardware knob or software
  • Speakers can be powered off independently of the RPi

Next I’ve got to get some perspex for a case and glue things in place. In the meantime I’ve got to decide whether to purchase a Model-A or a second Model-B, and also think about switching to veroboard and put the button/LCD on wires instead of mounted directly on the breadboard.

Kindle Jailbreaking

I thought I’d have a go at jailbreaking my spare Kindle 3G to use it as a display for my Raspberry Pi (unfortunately it seems you can’t use it like a serial console, you essentially just use the Kindle to SSH over USB to the Pi). Its unregistered and has no wifi configured, so will never get any over-the-air firmware updates from Amazon.

Anyway, after remembering that my Kindle is actually a US model, not a UK one as I bought it in France, I downloaded the lastest 3.4 firmware Update_kindle_3.4_B006.bin from here, so I could do an offline update from 3.3 that was on there.

Internet Radio Project Part 2

I’ve started to receive my parts and have cleaned up my music collection using Beets, well I say cleaned up, I’ve actually got about half of it nicely sorted and half of it is just a bunch of random MP3’s or rips of old “Best Of” CD’s from Woolworths circa 1990! I’ve installed MPC and MPD, setup autofs to mount the NFSv4 fileserver, and got playback working from the 3.5mm jack by running: