Monday, January 26, 2015

Robot Club - third session completed


Link to Preparing post details in the parts in the kits.: http://winkleink.blogspot.co.uk/2014/11/preparing-for-2015-after-school.html

Link to First session; http://winkleink.blogspot.co.uk/2015/01/robot-club-first-session-completed.html



Yes, I didn't do a post on the second session so here's a summary.
More time building the robots Added the L298N h-bridge to control the motors, put batteries in and touched wires to make the wheels spin.

On to the 3rd session.
Today was a bit different in that 6 of the kids couldn't make it. 5 were at an event in the O2 while the sixth had something else to do, so there were only 4 in the club today.
The great ICT Tech at the school had installed the necessary drivers to allow the Arduino Nano compatibles to work with the school computers.  As you'd expect for a school these computers are quite locked down, so very grateful for the work the school tech did.

As there were only 4 kids in the club each of them had their own Arduino robot to work with.
I explained the pins on the Arduino that we were using and why I selected pins 3, 5, 6 and 9 because these are the PWM lines. A bit sketching on the whiteboard and it looked like they understand the principle of using PWM which would be a project for another day.

Rather than beginning with a blank project we opened the example blink sketch and discussed what it did and how it worked.
Setting up the variable 'led' to equal 13
Setting 'led' to an OUTPUT

How the loop sets 'led' to HIGH turning the LED on
Waits one second
sets 'led' to LOW turning the LED off
Wait one second

We then discussed how the principles of turning an LED on and off is the same principle as making the motors spin.

Explained we had to set up 4 variables for the 4 pins controlling the 2 motors.
I asked them what the variables should be called.
One suggestion was variable1, variable2, variable3, variable4.  Following a few more questions and answers it became clear that these variable names wouldn't help is to remember what each variable was meant for.

We settled on.
motorleft1
motorleft2
motorright1
motorright2

Then set them all as OUTPUT

Added extra code to the loop to set one pin for each motor high and the other low causing the wheel to spin.


I was delighted when one of the kids who was new to the club asked if he could make the other wheel spin and explained how he would do it using the other pair of variables.
After this his robot started to spin and he wanted it to go straight so he changed the polarity of one of the motors and the the robot when whizzing off across the floor.

What a great session.  The kids did some real programming.Improved their understanding of variables and modifying the code.

Even learning how to use the keyboard to copy and paste to make it easy to do the 4 variable lines and the digitalWrite() commands without having to type every character manually.
Simple skills that make a big difference.

Next week the kids who didn't make today will be back so there will have to be a bit of a recap and then the first challenge.  Program the robot to go around the centre island of the  ICT Suite.
This will require them to figure out how to turn and with some trial and error work out the timing needed to navigate the course.
If they  get this done quickly I will add a slalom path as well requiring finer control.

Roll on next week and more fun.



Egham Raspberry Jam - 25th of January

What a day. More than double the attendees. More than double the stands, more teachers and kids attending.  More fun and learning than ever before.

When the Egham Jam was announced back in December I thought we would do better than the last Jam (46 registrations) but was blown away by the response.
Maybe a lot of new Raspberry Pis were sold at Christmas.
We were not only 'SOLD OUT' but also had more people who wanted to attend as well as people who register who advised me they couldn't make it so their tickets were released.

In the end 90 attended, more than double the October event and a record for the Egham Jam.

I was also really delighted the number of educators who attended looking for ways to integrate the Raspberry Pi into their schools Computing work.

There were at least 12 show and tell standard, some of them had multiple displays making for a very interesting day.  Also, very delighted that on a number of stands children were leading the show and tells. Giving great demonstrations on what they have build.

I tried to meet everybody who attended as possible and got the chance to connect teachers and people with specific needs with others who I know from previous Jams demoed a similar project.

Below are some pictures from the event.  Lots of fun.  Roll on the next Egham Raspberry Jam.

Surrey & Hampshire Hackspace were out in force

Scrolling messages


Pirates and MiWars winner

Raspberry Pi Development solution in a box


Robots are go.  Controlled over Wifi

Kodi set up being demoed by a young engineer


PiTrol - build it yourself controller

Remote arm controlled in Python


RISCOS on an HDMIPi



Seven Segment of Pi display



Getting the Wifi network set up to demo Airplay

Minecraft and RetroPie


Scratch 




Robot arm controlled from Scratch


Seven Segments of Pi. It's a big one.



Monday, January 12, 2015

Robot Club - first session completed

Link to Previous Post on Preparing for the Club with details on Partner Used: http://winkleink.blogspot.co.uk/2014/11/preparing-for-2015-after-school.html


Today we had the first session of the new robot club I'm running at my kids primary school.
It is for year 6, so 11-12 year olds.

The club is based on the parts from the previous post. http://winkleink.blogspot.co.uk/2014/11/preparing-for-2015-after-school.html

Today the kids came in and there were 3 from last year, so 7 new which is great.
Also, the gender mix is 4 boys and 6 girls.  Sounds very positive from a gender equality then heard the robot club is clashing with football, so expect there are many boys already committed to football.

Still it was a great first session.

The goal for today was to build the chassis.  I wanted to give the kids a bit of a challenge so we worked it out together using the Chinese instructions and my previously built chassis.

A lot of bolts going in the wrong way round and parts in upside down. So, each team had to take their bits apart multiple time.

As we went through the hour I expected the kids to lose heart with the every increasing times they had to remake the chassis.  But, I was delighted that by the end they were very excited to have it built and really wanted to do more.  We had to stop as parents were waiting to collect the kids.

We wired up some of the motors and I showed that since the motors mirror each other than with the motors wired the same way that one wheel goes forward and the other goes backwards with the same red-positive / black-negative wiring.  I explained we can sort this out in code.

The best comment of the day from one of the girls was. "Today is the first time I don't want to leave school."

She was very curious about the 4x4 keypad, so I explained how it works.
Send a signal into each horizontal pin one after another and seeing which pin it comes out at.

Metal Note: try to bring a white board market next time.  Teachers take them away after their classes.


In preparation for next week I have to get all the chassis sorted. One of the motors had the tab ripped off so lucky I have a spare motor.

Then add the L298N H-Bridge and Arduino Nano compatible so coding can start next week.

Goals for next session.
Understand the wiring.
Code to make it go forward, backwards and turn.
Program to go around the centre section in the room.

Roll on next Monday.