Arduino powered radio alarm clock – part 1

I had an idea to build an Arduino based radio alarm clock by re-purposing some other components I had lying around from other projects:

  • an Arduino Uno
  • an Adafruit 16×2 RGB LCD Pi Plate (for the display and control buttons)
  • an Adafruit Ultimate GPS breakout (for the time – what better way, albeit slightly over-engineered, to get the current time if not from GPS signals?)

The only part missing was an FM radio tuner. I was wondering how easy it would be to build a radio tuner from scratch (but not sure how I’d control it via the Arduino), so decided to take the easy approach to get started and use a TEA5767 based FM tuner on a chip. To make it even easier, I got a TEA5767 based breakout board for $5 on ebay that includes two jacks, one for an antenna and one for audio out.

Simon Monk has an Arduino library for the TEA5767 that has one function call to set the tuner frequency.

So far, pretty easy going. I have a start on combining the LCD to display time and GPS coords here. Now to add the radio library, add some controls from the Pi Plate buttons, and I’m almost there!

wp-1451374679689.jpg

Using Grub Customizer to … do what it says

Customizing your Grub2 config by hand is not a trivial task. On a re-purposed desktop over the past couple of months I’ve installed a bunch of different OSes, and my Grub menu on boot is a mess to say the least.

After installing more than one bootable Linux, you also (unless there’s a workaround for this?) end up with each Linux having it’s own grub config (/boot/grub/grub.cfg), although only one (the last installed) will have installed it’s config to your MBR. There’s a good question/answer on this here. In my case I do have two Linux installs, Mint and Kubuntu, so I did have to look at the config of each and work out which was currently installed to the MBR before I started doing any editing of the configs.

Luckily there’s an easier way to customize what OSes you have in your menu, using Grub Customizer – for install and usage see post here.

Part of my mess is having a prior install of Vista, upgraded to Windows 8, and then later upgraded to Windows 10. The boot menu options left behind are now for some reason a mix of all 3, even though only Windows 10 is actually installed and bootable. Plus I have a few Linux distros too:

Switching to View/Show Hidden, you can uncheck the menu entries you don’t want displayed, so that’s an easy fix. There’s plenty more options to configure and customize too, but for simple menu housecleaning, it’s an easier option than attempting to edit the grub config files by hand.

Ubuntu Ctrl-Alt-T Terminal window shortcut

I don’t know why I had never come across this before, but as an incredibly handy shortcut to open a new terminal window, use: Ctrl-Alt-T

This works on Ubuntu and derivatives, like Mint (is this a common Linux shortcut for all distros?)

Raspberry Pi Raspbian cross compiler toolchains on 64bit Linux

A while back I setup Eclipse C++ on Ubuntu to cross compile some ARM Assembly (see here). Last time I set up the Raspberry Pi tools on Ubuntu I was using a 32bit install. More recently I installed a 64bit version of Kubuntu, and so was retracing my steps to get set up again.

It might be obvious if you’re more familiar with gcc and cross compiler toolchains, but in the Raspberry Pi tools project there’s 32 bit and 64 bit versions of the tools. Trying to use the 32 bit versions on 64 bit Linux does not work. Rather than some useful error though, trying to execute any of the 32bit versions from a shell gives a rather un-useful ‘No such file or directory’ error.

Referring back to my original Eclipse C++ setup instructions, if you’re running Eclipse on 32bit Linux then you want to point to the tools here:

~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin

Otherwise point to the 64bit version here:

~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin