Les Pounder is a big player in the Linux & free software community in the North West. I first met him a few years ago when he was running Barcamp Blackpool, Blackpool GeekUp, Oggcamp in Liverpool, UCubed (Ubuntu & Upstream Unconference) in Manchester plus Linux user groups and other events. When I set up the Manchester Raspberry Jam in 2012, it was modelled on the style of a UCubed event – and Les came along to help out.
Les was working as a systems administrator around the time the Pi came out. Within a year or so of the community blossoming and his involvement growing, he decided to embark on a new career with the Pi at its heart. He got some work running CPD for teachers, introducing them to the Pi and to coding, he started writing articles for Linux Format, he started putting Raspberry Pi projects together for Element14, and since Linux Voice began he’s been contributing articles and Pi tutorials for them. He’s also currently working on a book with Wiley on Raspberry Pi & Arduino projects.
Les recently set up the Blackpool Raspberry Jam – and at their inaugural event he demonstrated a new project he made which brings the traditional board game Snakes and Ladders in to the digital world of IO with the Model B+. It’s called Pythons and Resistors. Over to Les:
For this project we will look back to our childhood and bring a much loved game from our past into the future. The humble board game.
Board games have been a traditional family pastime for many generations but with the rise of computer games their novelty has started to dwindle. These card and paper based games have little to offer the children of today who have been brought up on a diet of downloadable content packs and gamer scores.
But what if we could take a game from yesteryear and adapt it using the Raspberry Pi?
Meet the latest interactive board game: Pythons and Resistors.
The board game is based on a simple snakes and ladders setup, with 100 squares in total via a grid of 10 x 10 squares. The object of the game is for 2 or more players to roll a dice and move their game piece to match the number given on the dice. If the player lands on a python’s head, then they will slither down the game board to the tail of the Python. If the player lands on the bottom of a resistor then they will climb up the game board. The winner is the first player to reach square 100, which is at the top left of the board.
It’s been quiet around Pi Towers lately. Quiet and disquieting, rather like standing in your nan’s best front room when you were a kid and really needing a wee but were too afraid to break the silence. But we have good and exciting reasons for our quietude: we’ve all been busy preparing for two of our biggest events of the year. This weekend the education team is spreading it’s feelers of learning goodness around the world, from the Midlands to East Coast America.
Carrie Anne, Dave and Ben are at PyConUK while Rachel and I, along with James (our Director of Hardware), were beaten with a sock full of oranges until we sobbingly agreed to go to World Maker Faire New York.
The Maker Faire contingent will be joining our friends on the Pimoroni stand, demoing all sorts of goodies both new and old; selling shiny swag; giving out freebies; and talking and talking until we cough our larynxes into our fifteenth cup of Joe (as my American-English dictionary tells me I should call coffee if I want to be street).
New swag bags! Grab ‘em while they’re hot
Our director of hardware engineering James Adams will be there – he’s giving a talk on What’s next at Raspberry Pi? on [Saturday at 2.30pm according to this / Sunday 2pm according to this] in the NYSCI Auditorium – and Rachel and I will be speaking about digital creativity (details TBA). If you are at Maker Faire do come and visit us. At Maker Faire Bay Area earlier this year it was great to see so many educators and I hope to speak to at least as many in New York. But whatever your interests in Raspberry Pi – from digital creativity to hardware to making stuff (of course!) – we would love to see you.
If you can’t make it to New York, here’s a Q&A Make’s Matt Richardson conducted with James:
Meanwhile in Coventry Carrie Anne, Ben, Dave and Alex are running Python workshops, giving talks about Raspberry Pi in education and chatting to teachers, educators and developers in the Python community.
Here at MailChimp, we’re always trying to listen hard and change fast. Turns out, this requires a good bit of coffee. Each department has its own take on how to keep the stuff flowing, mostly with the standard Bunn-O-Matic commercial machines. A few folks regularly avail themselves of our espresso setup. The developers fill two airpots—one with regular, the other double strength.
And then there’s the marketing team and our precious Chemex.
We make a pour-over pot once every hour or so, all day long, 5 days a week, 50-something weeks a year. Last December, when we were gathering data for our annual report, we got curious about how many Fresh Pots that might amount to. We tried to count it up, but begrudgingly had to accept the fact we didn’t have a good measure beyond pounds consumed. We even tried to keep track with a bean counter, but that didn’t last long.
For a while, the exact nature of our coffee consumption seemed like it would remain just another mystery of the universe. But then one day, talking to Mark while waiting on yet another Fresh Pot, I said, “Hey, I bet we could track the temperature with a Raspberry Pi and post to the group chat when there’s a fresh one.”
I wasn’t too serious, but Mark’s response was one often heard around MailChimp when ridiculous projects are proposed: “Sounds great, just let me know what you need to get it done.”
With a Raspberry Pi in hand, the first thing I did was add a script to the boot process that sent an email using Mandrill with its IP so I could find it on our network without trouble.
Then, I had to tackle the problem of detecting pot states with only a single datapoint: current temperature. I hoped that comparing the running averages of different time spans would be enough to determine the pot’s status. (The average Chemex temperature over the course of a few minutes, for instance, would tell us something different than the average temperate over the course of an hour.)
Since this was a greenfield project, I wanted to work with an unfamiliar language. I felt like the more functional nature of Clojure would be a great fit for passing along a single piece of state. This turned out to be a great decision, and I’ll explain why in a minute.
Graph it home
I hacked together a quick program that would spit out the current temperature, minute’s running average, hour’s running average, and the running average’s rate of change to a log file so I could analyze them.
Log files in hand, I temporarily turned back to Ruby using the wonderful Gruff charting library to visualize things and make patterns easier to spot.
A few batches of hot water gave me a decent idea what things should look like, so I moved our coffee equipment to my desk to get some live data. This let me check in with the actual running state of the program and compare it with the status of the pot (and led to some coworker laughs and a wonderful smell at my workspace all day).
A brewing or fresh pot is easy to recognize, but figuring out when the pot is empty turned out to be a little tricky. It takes a while for the Chemex to completely cool off, which means it could be empty and still warm, which I’m sure would lead to more than a few disappointing trips to the kitchen. Luckily, the rate a pot cools tells us if it is empty or not—for instance, a half-full pot stays warm longer than an empty one simply because of the coffee still in it. Always nice to have physics on your side.
Watchers for the win
Armed with the collection of datapoints (running averages, rate of change, etc.) for each of the pot’s states, I moved on to figuring out how to notify our department’s group chat room when a pot was brewing, ready, empty, or stale. This is where some of the built-in features of Clojure came in handy.
I already had a program that logged the current state of itself every second. By switching the actual state to an agent, I could apply watchers to it. These watchers get called whenever the agent changes, which is perfect for analyzing changes in state.
Another agent added was the pot itself. The watcher for the temperature would look for the above mentioned boundaries, and update the pot’s state, leaving another watcher to track the pot and notify our chat room. When it came time to pick an alias to deliver the notifications, Dave Grohl was the natural choice.
Here’s a simple example of the pot watcher looking for a brewing pot:
The great thing is the watcher only gets called when the status changes, not on each tick of the temperature. Using agents felt great to me in this case as they provided a clean way to watch state (without callbacks or a ton of boilerplate) and maintain separation of concern between different parts of the program.
Freshness into the future
I’m still working out a few kinks, tuning in the bounds, and keeping a log of pots. It’s been a fun experience and I learned a ton. Something tells me this won’t be the last time we work with Raspberry Pi on a project. What’s next, Fresh Pots in space? Luckily, we’ve got plenty of coffee to propel us.
Ben: Thanks to Steven and MailChimp for permission to use the post – we’re very pleased to see the Pi used as the tool of choice of coffee-hungry developers around the world! Coffee is important to us here at Pi Towers…
Blast from the past – remember this coffee pot? Click to read more
MailChimp is what I use to power Pi Weekly – my weekly Raspberry Pi news & projects email newsletter – check it out at piweekly.net!
If you head over to the downloads page, you’ll find new versions of our Raspbian image and NOOBS installer. Alongside the usual firmware and kernel improvements, major changes to the Raspbian image include:
Java updated to JDK 8
Mathematica updated to version 10
Sonic Pi updated to version 2
Minecraft Pi pre-installed
Following its release last week, of our port of Epiphany has replaced Midori as the default browser, bringing with it hardware-accelerated video support and better standards compliance.
Epiphany is now the default browser
Our Raspbian image now includes driver support for the BCM43143 802.11n WiFi chip. Last week Broadcom released a rather neat USB hub and WiFi adapter combo based on this chip, which should now work out of the box. More info is available here.
BCM43143 802.11n USB hub and WiFi adapter
Finally, to free up SD card space, the offline NOOBS package now only contains the Raspbian archive. To install Arch, Pidora, OpenELEC, RaspBMC or RISC OS you will require a network connection.
One more project, that shows breathtaking beauty of the FFT (Fast Fourier Transform). Once again, like in last 3D Ultrasonic Radar Project, Arduino DUE was nominated to be Maestro, doing major part of the Digital Signal Processing in real time. As you can see below, the hardware includes 4 “modules”:
Last two items aren’t strictly necessary. Alternative would be to connect TFT display directly to arduino, but I decided not to spend my time on re-inventing drawing-rendering software. Better to delegate all visualization stuff to the equipment that was specifically design by big monsters in high tech industry. I spend quite time digging into android graphics subject anyway, only hoping I can apply my knowledge somewhere else later on.
Sensor board holds 4 microphones from SFE. Plus a few decoupling components, capacitors and inductor in power line.
Brief summary: Arduino sampling 4 analog inputs, close to 41 kHz, x 4 = 164 ksps, software library Radix4 posted on this blog was imported into project practically intact. DMA feature on Arduino DUE allows sampling rate up to 1 MSPS, and I already successfully tested its capability in 3D Radar project. Having 2048 fft size, at the first processing stage output there are 1024 bins 20 Hz each. Than, using arctangent LUT, phase of each bin is extracted. Difference in phases two vertically position microphones gives Y component, and two horizontally spaced mic’s – X component. Sound source is localized with accuracy ~ 0.5 degree. Have to say, that on the lower frequency end, 100 Hz – 1 kHz , where wavelength is huge compare to spacing between two mic’s ( 3.4 meters at 100 Hz ), accuracy is deteriorating proportionally to wavelength.
Arduino is calculating data really fast, providing X, Y, and M every 50 milliseconds. M – is for magnitude. Than, all this data stream flows to android over BT. Everything else is obvious, watch the video.
Speaker outputs white noise, as for single tone (frequency) only one pixel would be visible on screen. Android software “colorized” picture based on a frequency, low range – starting from red, and up to violet on high end of the frequency band, through all 1024 color wheel possibilities. You can see, that picture saturated with green and blue, and there is almost no red color. There are two things, first is a speaker, not performing well at low end. Second nuance is the fact, that low frequencies are not “grouped” so effectively, due to the localization error, what I tried to explain in a paragraph above. I created an option in the menu to select different types of colorization, based on a frequency or based on a magnitude. They are look pretty similar for white noise source, so there is only one video clip.
With the success of the first two productions from Saladhouse, our animator friends in Manchester (What is a Raspberry Pi? and Setting up your Raspberry Pi), we proceeded to make plans for a third in the series. The topic we chose to cover this time is one which demonstrates the additional power of the Pi in learning – an introduction to the realm of physical computing.
Look through the amazing projects in our blog, the MagPi or Pi Weekly and you’ll see many of them use the portability of the small form factor and low powered nature of the Pi along with the extensibility the GPIO pins give you – not to mention the wealth of community produced add-on boards available making it all much easier.
Those pins sticking out there. General Purpose Input/Output. Did we mention there are 40 on the B+?
Here at Pi Towers we all love physical projects – from robotics and home automation to flatulence alarms and scaring the elderly – and we believe they’re a great way to introduce young people to coding, computational thinking, product development and understanding systems.
The video refers to some resources for projects you can make yourself. We featured the hamster disco on our blog in July, and you may have heard talk of some of the others on twitter – which are all brand new, constructed and tested by our education team. They are:
The Raspberry Pi has an HDMI port to connect a display. If your monitor only has VGA, you have to use an adapter. Because this requires a digital-to-analogue conversion, those adapters can be quite pricey, and they can draw lots of power. So our friend Gert van Loo (who developed the Alpha board that became the Raspberry Pi, and the man behind the Gertboard and Gertduino) has created a VGA adapter that uses the Pi’s GPIO.
This wasn’t possible on the Model A or B, but now the B+ exposes 40 GPIO pins, there’s more to play with. As well as just allowing you to connect a VGA monitor natively, it also means you can use it as a secondary monitor alongside HDMI. And unlike composite video, the DPI interface can be run independent of the HDMI. The software for dual screens is still under development, but we expect that to arrive in the next couple of weeks. Running two screens at maximum resolution will consume SDRAM bandwidth, and is yet to be tested. (And there’s a catch: as the board uses most of your GPIO pins, you lose access to them.)
The VGA output supports the same resolution as your HDMI one: from 640 x 480 up to 1920 x 1024 at 60fps. At the highest resolution the pixel quality is almost as good as HDMI. The adapter uses a simple resistor ladder network as a digital-to-analogue converter, so the colour quality depends on how well-balanced your resistors are. There is slight colour banding, and with 6 bits per channel you have a maximum of 262144 colours.
Dom has been working on the software side and the new DPI (read: VGA) driver software has been added to the latest release.
“Where can I buy one?”, I hear you ask. Currently, nowhere. But Gert has made the VGA adapter open hardware, so you can make it yourself, or find yourself an enthusiastic partner and have it made. All the data is in the public domain on GitHub. Besides the manual and schematics, you will also find the database for the PCB and the Gerber files. The PCB design supports both through-hole and SMD parts. The design consists of:
The cost is not prohibitive, but having a single PCB made is rather expensive, so you might want to collect a group of interested people and order a batch; if you’re interested in doing that, head over to the forums and see if you can organise a group buy.
Gert’s looking to get the PCBs produced, and hopefully the manufacturer will be able to put them on sale (we’ll update with a link) – but they’re so easy to make we anticipate they’ll be generally available before long anyway. Gert says he expects in due time that a far-east manufacturer will see fit to sell them for two dollars.
Want to see a prototype? Of course you do.
Click to embiggen, and marvel at Gert’s work soldering together some of those teeny resistors.
At the end of August, Luke Westaway from CNET’s Adventures in Tech came to visit us with a film crew. Here’s the resulting video. We are impressed that somehow the CNET team managed to avoid moiré fringing effects with Gordon’s shirt.
If you’re a regular reader, you’ll recall that a month or so ago, we announced a new way of making add-on hardware for the Raspberry Pi: namely, the Raspberry Pi HAT (Hardware Attached on Top). You can read James, our Director of Hardware, explaining what they’re all about in the original blog post: in short, the HAT is a solder-less way of attaching hardware which can be auto-detected by the Pi, so GPIOs and headers are automagically configured by the Pi, without you having to do anything.
The pink confection on top of Gordon is a hat, not a HAT.
(A tangentially related question: how do you pronounce EEPROM? Fights are breaking out at Pi Towers: a small majority of us rhyme the first syllable with “meep”, while the rest of us rhyme with “meh”. This is like the scone/scone thing all over again. Angry opinions in the comments, please.)
HATs are starting to appear in the wild. Adafruit are sending PCBs out for prototyping. HiFiBerry have HATs you can buy now: the Digi+, which enables you to connect an external digital-to-analogue converter; and the DAC+, a high-res all-in-one DAC. AB Electronics are carrying several HATs: an analogue-to-digital converter (ADC); a GPIO port expander; a real-time clock (RTC) and an RS232 serial interface. And the whimsical bearded pixies at Pimoroni have come up with my favourite so far (it’s my favourite because SPARKLES): the Unicorn HAT. I saw it in the flesh on Saturday at the Cambridge Raspberry Jam. It’s a thing of beauty. Here’s Paul, introducing the Unicorn HAT.
Are you making a HAT? Let us know in the comments: I’ll add links to this post if I’ve missed yours out here.
This week, Dr Sam Aaron released the much anticipated final version of Sonic Pi v2.0. It will be replacing Sonic Pi v1 on Raspbian very soon, and you will be able to get it via our Downloads page (we will let you know when). In the meantime, you can follow the instructions at the bottom of this post to download and install it. The latest version of Sonic Pi brings music creation and performance to the forefront with live coding capabilities, parameter modification, samples and much more!
To celebrate, we have launched the first ever Sonic Pi Competition to find some of the best space-themed music, coded with Sonic Pi v2.0 by school children in the UK. The Sonic Pi Competition is designed to encourage school students aged between 6 and 16 years old to use their creativity and coding knowledge to create a unique and original two-minute piece of music on a Raspberry Pi device.
Entries need to include an audio file of what the music sounds like, the code used to create it, a short written description, and a cover art file.
All entries will be put into a hat to win a Raspberry Pi and SD card at random. Semi-finalists will win a Sonic Pi half-day workshop with Sam Aaron and Juneau Projects for their school, and a custom Sonic Pi Pibow case. Overall winners in each category will win a Sonic Pi classroom kit containing 25 x Raspberry Pis and peripherals for their school and a Minirig speaker, as well as a Sonic Pi Competition trophy designed by artists Juneau Projects.
The final will take place at the Cambridge Junction on 4th November 2014 as part of the Sonic Pi Live & Coding Summit, with the 12 semi-finalists (four in each category) introducing and playing their music on a Raspberry Pi to the audience in front of an expert panel of judges.
You can read all about the build – which involved hacking the power supply to the bus stop so it provided 230V of AC for the monitor – over at Norwegian Creations.
We love Maker Faires, and we love the way that this sort of bus stop hacking project has become – well, if not exactly mainstream, something culturally recognisable. If you want to meet the team at a Maker Faire this month, Rachel Clive and James will be with the folks from Pimoroni, demonstrating what happens when art, education and science come together in the form of a tiny computer at the gargantuan World Maker Faire in New York on Sept 20-21.
(It’s the first World Maker Faire Eben and I have ever missed, but we have a great excuse; it clashes with the vacation we’ve been planning all year for our tenth wedding anniversary.) Say hi to the giant motorised cupcakes for us!
Back in the mid-seventies, when I was even smaller and more adorable than I am today, my parents bought me a Fisher Price Chatter Telephone. I’m sure many of you had one too. Mine was called Bert. I loved him, chewed him, made imaginary phone calls on him, and pretended he was a pet dog. (With a rotary dial and a handset, natch.)
This year, I was surprised on visiting Lorna, our Trademark Compliance Elf, and her two small children, to discover that the Chatter Telephone is still manufactured, even though no child born in the 21st century recognises things with rotary dials and giant handsets as phones. (Phones are the little black slab things that we use to Skype with distant aunties, and they definitely don’t have wheels.)
Grant Gibson got his hands on a modern Chatter Telephone for his son, who didn’t seem particularly moved by it (probably because little black slab, Skype, etc.) So he decided to hack it into something a bit more interactive, and came up with this. A Chatter Smartphone.
The rotary dial provides the inputs, sound is output through the modern Chatter Telephone’s speakers (the vintage ones didn’t have speakers, but the modern ones play clips from Toy Story), and he’s added a servo motor to control the googly eyes. This particular Chatter Smartphone has been set up to deliver weather information, cinema listings, and more; as well as offering information on demand, it can issue alerts, so Grant’s family knows when he’s left the office and is on his way home, or if the ISS is passing overhead. If you make your own, Grant has provided code so you can adapt yours to your own needs.
You’ll find comprehensive build instructions, along with all the electronics help and code you’ll need, at Grant’s blog. Thanks Grant – we love it!
Are you a teacher? Have you got back-to-school blues after yesterday’s return to the staffroom? Are your classroom displays distinctly lacking in interaction or automation? Are you bored of taking the register the old fashioned way? Well we think that we have the perfect remedy for you!
Have you packed your Raspberry Pi yet?
We’re offering another two days of FREE training from the Education Team in our HQ home town of Cambridge, UK. You don’t need any experience with Raspberry Pi. We will teach you, inspire you, feed you, and give you free resources. All you need to do is get here! We are confident that you will have such a good time that you’ll shake those back-to school-blues and be excited about getting hands on with technology in your classroom, like Raspberry Certified Educators Dan Aldred and Sue Gray, who created a dancing and singing glove over the two days of training:
Apply nowfor September Picademy (29th & 30th September 2014). The deadline for applications for this event is on Friday 5th September, so you’ve only got a few more days. We will email all successful candidates on Monday 8th September.
Applications for October Picademy (27th & 28th October 2014) will remain open until Friday 3rd October.
We accept applications from practicing teachers from all over the world who teach any subject area. We’ve had art teachers, history teachers, science teachers and Primary non-subject specialists as well as ICT and Computing teachers visit Picademy; the course is appropriate for any teacher, no matter what their subject.
Here is what some of our Raspberry Pi Certified Educators have to say about their experience at a Picademy:
Picademy was a hard two days of CPD but was definitely the best I have been on. It is difficult to mention the best thing about it because there were so many! Unlike most CPD I have been on we were not just talked at – we were hands on developing and creating nearly all the time. We had so many opportunities to networking and share ideas – I have not used Twitter so much and am seeing more value in it now. The time simply flew by especially when we were working on our projects during which we were writing code, debugging, bouncing ideas around, sharing, creating, swearing, laughing, tweeting, eating sweets, learning, googling, performing bear surgery and collaborating. Although the two days finished last week for Picademy#3 it hasn’t stopped – ideas are still flowing and the tweets and emails are pinging about the internet. – Matthew Parry – CAS Master Teacher
It was an epic journey. For some present, they had never plugged in a Pi before Monday, by the end they were exploring different programming concepts not for necessity but for curiosity and intrigue. For others, we now had a colossal array of activity ideas and cross-curricular links not to mention a brilliant network of fellow interested educators. What more can you ask for from 2 free days of CPD? – Sway Grantham - Primary Teacher, UK.
Back in December 2013, we discussed our plans to develop an improved web browser for Raspberry Pi. The browser is based on Epiphany (aka GNOME Web), as a replacement for the rather venerable version of Midori in Raspbian Wheezy.
Epiphany brings a host of neat features to Raspberry Pi, including:
Much-improved HTML5 support
Hardware-accelerated video decoding
ARMv6-optimized blitting functions
Better interactivity during page loading
Future releases of Raspbian and NOOBS will include Epiphany as the default browser, but the necessary packages are already in our repository. To install, type: