Learning Python With Tron Radio

[5 Volt Junkie] has built his share of Arduino projects, but never anything with Python, and certainly never anything with a GUI. After listening to Internet radio one day, a new idea for a project was born: a Raspberry Pi with a small touchscreen display for a UI and displaying soma.fm tracks. It’s finally finished, and it’s a great introduction to Python, Pygame, and driving tiny little displays with the Pi.

Playing soma.fm streams was handled by mpd and mpc, while the task of driving a 2.8″ TFT LCD was handled by the fbtft Linux framebuffer driver. This left [5 Volt Junkie] with the task of creating a GUI, some buttons, and working out how to play a few streams. This meant drawing some buttons in Inkscape, but these were admittedly terrible, so [5 Volt Junkie] gave up and turned on the TV. Tron Legacy was playing, giving him the inspiration to complete his Tron-themed music player.

The result of [5 Volt Junkie]’s work is a few hundred lines of Python with Pygame and a few multicolor skins all wrapped up in a Tron theme. It looks great, it works great, and it’s a great introduction to Python and Pygame.

19 thoughts on “Learning Python With Tron Radio

    1. Not all cultures do what we learned in grade school, i.e. put the most significant digits on the left, with each digit less significant as you move to the right (i.e. hundreds, tens then units). For dates logically this would be Years: Thousands, Hundreds, Tens, Units, then Months: Tens, Units, then Days: Tens, Units. Some cultures mix them around to confuse others. I think in certain primitive places they do tens then hundreds then units.

    2. Man, this just reminds me of how being from the US is like being damned if you do, and damned if you don’t. If you don’t know something about culture outside of the US, you’re a jerk, and everyone gets angry at you. If, however, you were to point out that something is different in US culture … you’re a jerk and everyone gets angry at you.

      1. Hmmm – my comment above was a bit demeaning. There are advantages to both systems of writing dates as has been mentioned below. It’s just confusing (for us not from the USA) when dates are written (random example) “Avatar the Movie: coming 07/08/09” – when it came out in 2009 we thought – Sheesh they’ve had it in the US for two years already – but was it August or September?
        However, the point of the entry is not about dates, but about the cool hack – I’m gonna use it as a great way to learn Python

      1. The nice thing about using that especially with appending to file names the files will sort themselves by date when you sort by file name. I had always been irritated since childhood with the American way of writing dates. mm-dd-yyyy not ordered by significance at all! Big endian or little endian yes but this no!

        1. Actually the “correct” way would be YYYY-MM-DD.
          The American way reflects the way most people say dates for example January 5th 2004. This is just a reflection of language vs math.

          1. How about saying ” the fifth of January 2004″
            Or dd mm yyyy ?
            This is the British way. I don’t think there’s any definitive way that is the best, only what we are used to.
            Personally I find mm dd yyyy rather odd and anything starting with the year incomprehensible.

      2. Thank you for linking to this I’ve always thought this was the most logical order to write the date and have found it odd that there are so many variations. Now I am frustrated that ISO stands for International Organization for Standardization, shouldn’t it be IOS? Why aren’t acronyms standardized?

        1. Why not OIN Organisation internationale de normalisation? (french). Internationale Organisation für Normung (german) ….

          International, like in the whole world, all languages. So they choose ISO as in isos. That’s greek for ‘equal’.

          And no, you are not center of this planet.

  1. I tried this last week, and it worked well so far. But only with Alsa. I couldn’t get it going with Pulseaudio.
    Why I want Pulseaudio? Because I want also squeezelite running in the background.
    Any Idea how to solve this?

  2. Very nice project! I like the Tron styling, but it would much improved if you added some touch feedback: maybe a brighter glow when pressed? TS GUIs without any feedback can be pretty annoying as you don’t know when or if the system actually got your request :-)

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