PiDojo : A taste of the Raspberry Pi

Today we had our second taster session with the Raspberry Pi. We wrote a basic a basic hello world program using Nano which is a simple command line text editor. Then we coded the physical computing version of hello world which is turning a led on and off.

When the Raspberry Pi And Electronics group starts up properly we will revisit this and look at the code in more depth. I will also show you how to set up your own RPi if you have one, remember a Raspberry Pi is not necessary, I will also show you how to connect to a virtual desktop.

Here are my slides from today Taster Session

CoderDojo Athenry at Coolest Projects 2015

Congratulations to everybody from CoderDojo Athenry who participated in the CoderDojo Coolest Projects event on 13 June 2015. It was a very impressive event, held in the RDS Dublin, with over 500 projects from CoderDojo ninjas from Ireland and worldwide.

Here are photos of the participants from CoderDojo Athenry.

Games Category:

James from the Minecraft Modders group with his technically impressive XyZ Mod with World Gen and Gauntlets:


Eoin from the Minecraft Modders group who entered the detailed and very well structured Global Cuisine mod:


Ruaidhrí and Luke from the Minecraft Modders group who entered the Weapons, Armour and Money mod:


Hardware Category:

Michael and Mikey from the CoderDojo Athenry PiDojo who entered their clever and topical Shower Evaluator project that times your shower and displays the amount of water used, cost of water, and cost of energy:


Alaidh from the PiDojo group who entered the very innovative Sensor Guide for the visually impaired, which was impressively backed up with scientific evaluation:


Scratch Over 10s:

Emily and Chloe from the Scratch Advanced group had a Scratch program with great environmental potential, Cúisneor, that helps to reduce food waste:


Scratch Under 10s:

Rachel from the Scratch Beginners/Intermediate Group was our youngest entrant from CoderDojo Athenry, aged 8, and had a fantastic Scratch app for helping young children to learn the letters of the alphabet:


Well done to everybody who entered!

We should also mention that three projects won prizes:

  • Ruaidhrí and Luke won a prize for best use of Microsoft technologies (Microsoft owns Minecraft, of course)
  • Alaidh won a prize for being a finalist in the Hardware category
  • Mikey and Michael also won a prize for being a finalist in the Hardware category.

PiDojo : Ultrasonic Range Sensor with the Raspberry Pi

The HC-SR04 Ultrasonic Module Distance Sensor is a cheap sensor that can be used to measure the distance between itself and an object in front of it by sending an ultrasonic pulse and listening for its echo. It can be connected to many things including the Raspberry Pi.

The HC-SR04 Ultrasonic Distance Sensor

The HC-SR04 Ultrasonic Distance Sensor

We connected up our sensor and used the following code to take a measurement.



import time
import RPi.GPIO as GPIO



print ("Ultrasonic Measurement")




start = time.time()
while GPIO.input(GPIO_ECHO)==0:
 start = time.time()

while GPIO.input(GPIO_ECHO)==1:
 stop = time.time()

elapsed = stop - start

distance = elapsed * 34000

distance = distance / 2

print ('distance = ', distance)



We then combined our sensor with our 7-Segment displays from last week.
Here are my slides ultrasonic measurement

PiDojo : 7-Segment Displays on the Raspberry Pi

This weekend we continued to explore the Raspberry Pi’s GPIO pins. We had a look at a Data Sheet for a 7-segment display then we went through the code needed to write the number 8 on one and then the Ninjas had a go at writing their own messages on it.

Our 7-Segment display wired up and ready to go.

Our 7-Segment display wired up and ready to go.

Afterwards we tested some code for sending data to two 7-Segment displays by flashing each LED on and off for a fraction of a second and we also had a look at the time.strftime() method which is useful when we need the “time of day” in our code.Next week we will do a little more work with clocks and we will start putting together a measuring device which uses the HC-SR04 Ultrasonic Sensor.

These are my slides from today Raspberry Pi 7-segment display

PiDojo : Programming the Raspberry Pi

Over the last couple of sessions we’ve been using Python to write some programs for the Raspberry Pi.

Last week we wrote some easy Hello World type programs and today we finally started to use the Raspberry Pi GPIO pins.

We learned how to set up pins as outputs or inputs and how to use these pins to light up a LED or sound a buzzer and how to read from an input pin.

The group then used what we learned to make a simple traffic light.

Our breadboard with LEDS, buzzers and a switch

Our breadboard with LEDS, buzzers and a switch

Here are my slides from the last two sessions Raspberry Pi programs

PiDojo : Connecting to the Raspberry Pi from your laptop

As it would be awkward to bring televisions and keyboards and all the other equipment required to operate the Raspberry Pi into CoderDojo we will connect to them from our laptops. We had a go at this today and we made some progress but we had problems with a couple of computers hopefully, I may have found a fix for them.

We were able to connect most of the laptops using Internet Connection Sharing but on the ones we couldn’t connect to, I think creating a Network Bridge might work. Instructions are available here. Here are my slides from today Raspberry Pi Headless Operation.pptx

PiDojo -week 1 : Getting started with the Raspberry Pi

Today we had our first PiDojo session. We had a short demo where we looked at what is possible with the Raspberry Pi.

We then had a search for projects where we saw loads of interesting ideas. We also set up one of our five new RPis.

We will continue working with the Raspberry Pi after the break so anybody who is interested can come along. All you need to bring is your laptop and an idea for a Raspberry Pi project.

Here are my slides from today Raspberry Pi presentation