Wirelessly control an ESP8266 with MQTT messages from a Raspberry Pi

Rui Santos from Portugal has written an excellent, comprehensive tutorial for those who want to get into ESP8266 boards and control them from a Raspberry Pi. He uses Python on the Raspberry Pi, with imported MQTT libraries, and C code for the Arduino-like ESP8266. The ESP8266, which is on the same network as the Raspberry Pi, then ‘subscribes’ to a page on the Pi which is changed when a user clicks on a button on the Pi’s web interface. And voila! You can click a web button and have an LED connected to the ESP8266 light up wirelessly! You can read the tutorial here.

ESP8266s must be the flavour-of-the-month, I only posted about reading sensors using one the other day!

micro:bit sequencer using a Raspberry Pi for sound synthesis

David Whale (@whaleygeek), who some of you will know (he goes to a lot of events and does loads of outreach work, especially with micro:bit and the IET, and also runs a Raspberry Pi club in Harlow) and Jonny Austin, CTO of the micro:bit Foundation, have done an excellent project to show the micro:bit and the Raspberry Pi working together. They’ve built a rotunda, called a Tone Matrix, of 40 micro:bits representing a musical scale with each of 8 columns representing groups of notes on a pentatonic scale.

As the micro:bits are switched on, they communicate wirelessly with another micro:bit which is attached to a Raspberry Pi. The Pi then interprets which micro:bit(s) in the matrix are switched on and plays tones according to their positions. The whole thing then plays the notes in a loop, using Pygame for the individual ‘notes’ control. It is even possible to play a chord by turning on several micro:bits in a column.

I spoke to David about the project, and he explained it in-depth and told me that most of the actual computational work is done by the Pi – the micro:bits are essentially used as controllers.

Jonny and I never met while working on this. We collaborated via Skype and Github the whole way. I tested the Pi code on a train and Jonny wrote the micro:bit code on a plane.

The laser-cut frame for the instrument was created at Cambridge Makespace.

You can see a video of it in action, at Bett, below (it runs from the beginning to about 3:45) and a slightly closer-up video of it via Twitter here. You can see all the code on Github here.

 

Build a Raspberry Pi-powered thumb harp (English and French versions)

Here’s another tutorial, this time in the form of an Instructable, although it’s not for the ‘beginner’. It uses wires of different lengths, an accelerometer to detect different vibrations caused by plucking the wires and an MCP3008 analog-to-digital converter chip to translate the signals produced. These are fed into the Raspberry Pi which generates synthesized noises via ALSA based on the initial vibrations. The software is written in C. The tutorial is written in English and French and can be found here.

Monitor your home appliances with a Raspberry Pi and vibration sensor

Here’s a good little tutorial I found on GitHub. It uses an 801s vibration module and a Raspberry Pi Zero to detect vibrations from a home appliance, such as a washing machine. If it detects stillness for a specified amount of time, the appliance is assumed to have finished running and a tweet is sent to let you know. It’s a nice combination of hardware and software and can be found here on GitHub.

Barcelona Raspberry Jam – 11th March

Ferran Fàbregas is organising the third Barcelona Raspberry Jam on Saturday, 11th March. The event runs from 10am-6pm and takes place at Soko Tech. Tickets are free, although there is an option to pay for a 3-hour arcade games controller workshop which includes all the equipment you need. So, if you’re going to be in the area, take a look at the event and register on Eventbrite.

pi-top Champions Raspberry Pi workshops at the National Museum of Computing, Milton Keynes – 19th February

Recently, pi-top announced the Champions scheme in which certain individuals and teams were provided with a set of pi-top Ceeds to be used at events and workshops. Well, on Sunday, 19th February, several of us will be involved in giving workshops at the National Museum of Computing in Bletchley Park, Milton Keynes. There will be some hour-long workshops, using a variety of languages such as Scratch, Python and Sonic Pi, and also physical computing drop-in sessions in the WITCH gallery. To attend the sessions, you will need to pay for entry to the Museum itself but the sessions themselves are free. If you’re planning to come along, please let us know by grabbing a ticket on Eventbrite. You can also find out more about the sessions on Eventbrite. If you’ve got any questions, let me know in the comments!