Hour of Code - Send an SOS to the world
Coding is not only about gaming... Children looks forward discovering that digital is also about real life interaction! The purpose of this article is to show how you can easily introduce a piece of electronic in your coding session with children.
As I recently join a CoderDojo in Dublin as volunteer, I tried to introduce something different than our usual Minecraft or Scratch sessions.
I decided to introduce a piece of electronic with a Raspberry Pi in a recent session. We did this session with 9 years old children's who are used to code.org activities. We wanted to prepare ourselves for a worldwide event which will happen on May 26th in Kilkenny (Ireland): the DojoCon 2018
The goal of the session is to send an SOS message in Morse with a LED by programming a Raspberry Pi.
This session covers 3 mains objectives for the kids:
- Discover what is Morse?
- Understand how to read and wire a simple electronic schema
- Program the sequence with Scratch (we will move to python later on !)
What is Morse ?
Morse in an alphabet or code in which letters are represented by combinations of long and short light or sound signals.
Aeronautical navigational aids constantly identify in Morse code. Compared to voice, Morse code is less sensitive to poor signal conditions, yet still comprehensible to humans without a decoding device. Morse is, therefore, a useful alternative to synthesized speech for sending automated data to skilled listeners on voice channels.
In our example, the objective is to send an SOS message with a red LED. Here is the SOS pattern:
Start with Electronic wiring
Wiring is good for children as they can discover electronics material such as LED and resistor. They also do a manual activity which requires them to be focused and precise!
There are many examples of electronic wiring available on the web to manage an LED from a Raspberry Pi. All details about this example can be found in this article
For this session, you will need the following material:
- 1 breadboard: the breadboard is a way of connecting electronic components to each other without having to solder them together. They are often used to test a circuit design before creating a Printed Circuit Board (PCB).
- 1 resistor
- 1 LED
- 3 jumper wires
Software - Let's start coding !
As the electronic is now ready, we can start with the software piece. We find an interactive way to play with the general outputs of the Raspberry Pi. Indeed, Scratch offers an extension library which allows to directly manage Raspberry Pi Inputs/Outputs.
The following picture shows how easy it is to do our 3 sequences of LED blinking. You can see that the time when the LED is on is the only difference between 'S' and 'O'. (2 seconds 'on' for the 'O' against 1 for the 'S'
Here we are… Now it is time to test and to adapt or sequence to do some more funny sequence by adding a Green LED !
Look for CoderDojo around you and give a chance to your Children to make their future "Digital"
#rasperrypi #code.org #coderdojo #scratch
Nice post Adrien, in other countries we also have Devoxx4Kids which organizes events for kids ;-)
I can’t be more agreed. Don’t hesitate to connect you with Irish tech 😉
Laurent , it could be great and you will have to come to Dublin ;0) You can also look on https://coderdojo.com/. There maybe a place where you and your kids can go to do such sessions. Else you may easily create a Dojo, you only need a place and motivation !
Well done Adrien Geymond I wish I could have you as a teacher.