Bodgers – Belts And Other News

Hi Everyone.

I haven’t posted here for a while as we’ve been working on projects for the past few months.

First of all I would like to congratulate the seventeen Bodgers who were awarded belts yesterday. It’s been a pleasure mentoring you and you are all welcome to return in September and spend another year with us in the Bodgers group.18673158_1465672443453618_5357526197824397574_o

I would like to thank Dave for helping me out with the group and thanks also to Alaidh who helped us up until Christmas.

Dave and I are already making plans for next year and we’re very excited about what we are going to do. Tune in next September when we will have more information.

In other news the CoderDojo Foundation and the Raspberry Pi Foundation have merged. I’m sure this will make very little difference to what we do day to day at CoderDojo Athenry, it may mean more resources will be available for us as a group involved in STEM activities. You can read more about it from CoderDojo here and from Raspberry Pi here.

Enjoy the summer and see you in September.


Bodgers – Reaction Game

reaction_bb.pngHi Everybody

This week we finished coding our Reaction Game. We then had Reaction Game tournament congratulations to Darragh our winner. I have a few slides from today which are available here reaction and you can also check out our code on Dropbox here.

For the next few weeks we will be building an Attendance/Clock In machine using our Laptops. You will need a version of Python 3, if you don’t have it installed you can download it from here.

See you all next week.

Bodgers – Robot Duels At CoderDojo Athenry

Hi Everyone

As part of the show and tell session the Bodgers group held a Robot Wars Style event. We used the two wheeled robots from last year controlled by Nintendo Wii Remotes.

If you want to build your own two wheeled robot you can check out my notes from last year here.

To control the robots using the Wiimote I followed Matt Hawkins Wiimote tutorial from here (If you have a Raspberry Pi 3 you can skip step 2 as Bluetooth is already working. Don’t forget step 3  install Python Cwiid). I then added the code to control the robot using GPIO Zero, you can get my code here.

Happy Christmas everybody.

Bodgers –Getting Started with Your Own Raspberry Pi or Arduino

Hi Everybody

This Saturday the Bodgers group looked at some of the tools available to set up and use the Raspberry Pi or Arduino at home. We looked software for formatting SD Cards, some of the SD card images available for the Raspberry Pi, putting images on SD cards, configuring the Raspberry Pi and connecting to the Raspberry Pi.

We also did a quick overview of the Arduino IDE. This software allows us to write and upload software to the Arduino.

You can find the links to the software we used short tutorials on how to use them in my slides from Saturday here pi-and-arduino-tools.

We also took a look at the MagPi Magazine which is the official Raspberry Pi magazine. there are a load of interesting articles in the Christmas issue which is in the shops now or is available for download for free from . There are a few nice articles on basic stuff like breadboards and GPIO Zero and there are also some articles on robot sensors which anybody who wants to continue from where we left off with robots will find very interesting.

There is also news of a new programme from the Raspberry Pi Foundation which is aimed at kids that are around the same age as the Bodgers group. The Pioneers is a series of challenges that will roughly last the length of the school term and will be open-ended to allow you to come up with your own ideas. Unfortunately the competition is limited to the UK for now but it will be open to the rest of the world soon. Check out The MagPi for more information.

The MagPi needed to show some examples of what kids can make for the Pioneers article so obviously they looked to CoderDojo Athenry for inspiration :).    capture

Bodgers – BackTo Basics

Hi again everybody.

Over the last couple of Saturdays the bodgers group have been preparing to build our own circuits. Two weeks ago we looked at some of the theory behind electronics, how the GPIO pins on the Raspberry Pi work, how to use GPIO Zero the main Python module we will use and we watched some videos which explained how some of the components we will be using work together. Last Saturday we built some simple circuits.

The first circuit shown above uses GPIO pin 17 to light a LED and the second uses GPIO 2 to read from push button switch. Here are my slides from both sessions back-to-basics.

As we have only a short session next week and the Christmas party is the following week we will return to building circuits after the Christmas break.

Next week I will demonstrate some of the tools I use to set up the Raspberry Pi, this will include tools to format and write to SD cards and tools for finding the IP address of your Raspberry Pi. I will also do a very basic overview of the Arduino. So if you have or are hoping to get some hardware to experiment with at home this session shouldn’t be missed.

I will also talk about what looks like a cool new challenge from the Raspberry Pi Foundation.

See you all next week.

Bodgers – Remote Controlled Robot With Webcam

Hi everybody, this week we changed from preprogrammed automated robots to remote-controlled robots. We converted our simple Pygame script from last week which controlled a small rectangle on our screens so it could control our robots.

As Pygame needs a screen to operate we had to get VNC going before we could start, I think we had it working for most people by the time the session ended. VNC will be a hugh advantage to us as we start to write more code as we can use a mouse and copy and paste with a GUI text editor instead of Nano on Putty.

We also added a webcam to our robots which worked well, we would probably need to work on mounting them properly if we wanted to use them for real life applications.

Here is a video of them in action.

I will go over the code again next week, if you want to take a look at the code check out and here.

We will leave robots for a while and go back to basic electronics for the next few weeks.


Bodgers – Robots and Pygame

Sorry for the delay in posting, I’ve been very busy this week. Last Saturday we started the session by testing our robots on an obstacle course. Here is a video of them in action.

Then we had a quick look at Pygame which we will use to control our robots this week. If you missed last week don’t worry as I will do a recap tomorrow. Meanwhile here is a very good Pygame tutorial. Here are my slides from last week pygame-101.

Bodgers – Finishing Our Automonous Robots


This week we worked on the function calls for our robot, however as most of the robots were low on battery power we didn’t get a chance to test them properly. I will have new batteries when we return on November 5th and we’ll spend a while running through the obstacle course. You can find code with the finished function calls on Dropbox.

We also talked about The Future Maker Awards which is a competition being run by CoderDojo and Liberty Global. I mentioned that you can use video as part of your entry this is an example of a video from Google Science Fair.

Here are my notes from last week obstacle-course.

See you all after the break. Happy Halloween.


Bodgers – Writing Our Own Functions


Hi Everybody

Our WiFi set up worked much better this week with an issue with only one of our routers which decided to give up half way through the session.

We started to write our own functions today, functions are very important in programming as they allow us to run the same code multiple times without rewriting the code several times. Instead, you can put that code inside a function and call the function several times. This has the added benefit that if the function’s code has a mistake, you only have one place in the program to fix it.

If we use names that relate to our function’s operation it will make our code much easier to understand.

Functions make designing and testing bigger programs much easier as we can break the project down to manageable chunks and we can write and test these functions individually.

As we saw last week the GPIO Zero library contains robot functions which turn our robot’s wheels forwards or backwards or in opposite directions to go left or right until we call the robot.stop() function. We are going to take these functions and the sleep() function and put them in functions that will make our robot go forward or backwards  by a specified amount of Centimetres or will turn it left or right by an amount of degrees. This week we wrote a function that makes our robot go forward. See code here. Here are this weeks slides writing-functions . Next week we will write the rest of our functions.

Some Bodgers and their parents have been asking about buying Raspberry Pis but I would advise holding off until we decide on our projects as some people may end up using Arduinos or Raspberry Pi Zeros depending on their project.

However if you want to get one to experiment at home with I would recommend the following sites. and for Raspberry Pi and accessories. If you are buying a case for your Pi I would recommend Pibow Coupé from Pimoroni as the GPIO pins are numbered and easy to get at. For electronic components such as sensors etc. are very good, they also do cheap Arduino clones. Avoid starter kits as you should be able to get your hands on stuff like keyboards if you ask friends and relations for them, do get SD cards as you can have different set ups on different cards e.g. Retropi, Kodi.

See you all next week.

Bodgers – Getting Started With Robots

We are still having network difficulties with WiFi on our Raspberry Pi3s but I will work on finding a solution or a work around during the week.

We managed to connect to two of our robots and we wrote a simple hello world script and a script to control our robots. When we use Python and the Gpio Zero module all it takes to control a wheeled robot like ours is 9 different lines of code these are:

  1. from time import sleep – this will allow us to call the sleep function later in the code.
  2. from gpiozero import Robot – this will allow us to call all the robot functions from Gpio Zero.
  3. robot = Robot(left=(22,23),right=(24,25)) – this is the most complicated line in our code, all it does is assign which gpio pins will be used to control our robot. This will become much clearer when we start to build simpler circuits later in the year.
  4. robot.forward() – this function drives all our motors forward.
  5. robot.backward() – this function drives all our motors backward.
  6. robot.left() – this function drives the motors on the right forward and the motors on the left backward.
  7. robot.right() – this function drives the motors on the left forward and the motors on the right backward.
  8. sleep() – this function pauses the program.
  9.  robot.stop() – this function stops the motors.

If we want to drive our robot forward for five seconds we would use the following code

  1. from time import sleep
  2. from gpiozero import Robot
  3. robot = Robot(left=(22,23),right=(24,25))
  4. robot.forward()
  5. sleep(5)
  6. robot.stop()

We had a brainstorming session about what we might do for our projects and we came up with some great ideas which we talk more about on Saturday. My slides from Saturday are  here robot-intro.