I have been searching for
Raspberry Jams in the local area and turning up empty. Either they are too far to travel or/and they are sold out in minutes. So when the Raspberry Pi Foundation
blog posted about the up coming
PyCon with a special kids day I jumped at the opportunity.
The
posting only revealed the kids day if you read past the Teachers bits and there seemed to be about 75 kids tickets available.
Not sure what to expect my 6 and 7 year old boys turned up the the TechnoCentre in Coventry University Technology Park with tickets in hand. Then we got blown away...
The boys both got a swag bag and t-shirt. In the swag bag was, personalised mug, Raspberry Pi book, sweets, key-ring, water bottle, lanyard and oh just a Raspberry Pi B+
Jammy kids !!
The whole day was a blast, from dancing robots to back flipping quad copters with cameras to Minecraft programming and show-and-tell with a Raspberry Pi powered arcade cabinet!
Alex had some exposure to
Minecraft on the Pi last year but, I was really impressed how willing a six year old was to try coding.
The first thing they said was "Parents hands off, let the kids make mistakes and teach them how to correct them", and I had to fight myself a couple of times from "driving".
See below for the code we wrote(not me).
I also found that was interest waned in typing in log code listings(10 lines) that the mention we could "cheat" brought bright interested faces back for more ;)
Here is Joseph with a £10,000 robot, they had 3 plus a newer £4,000 one that did everything and more its older cousins. We were able to chat to the demonstrators and see how the robot could be taught to recognise new object and react and of course do the
Gangnam style and the Star Wars story.
Here is my son trying to kill someone with a iPad controlled quad copter. This was shortly followed by the only near mid air collision, when the other son had control of a second copter.
Everybody was really friendly and made sure the kids had the most fun possible while unknowingly learning!
Code listings:
It started simple, the sleep is there to make sure you see the message before it is removed.
import minecraft
import block
import time
mc = minecraft.Minecraft.create()
mc.postToChat("hello joseph and Alex")
time.sleep(5)
Then we created a jet pack that fires Steve 50 blocks into the air. Note the "cheat" of using short variable names.
import minecraft
import block
import time
mc = minecraft.Minecraft.create()
p = mc.player.getPos()
mc.player.setPos(p.x, p.y + 50, p.z)
mc.postToChat("look down")
time.sleep(5)
The guide we were following suggested putting Diamond blocks beneath Steve's feet, but we changed that Beds. Problem is beds are multi block constructs and the following code created a kind of bed-quicksand under Steve.
import minecraft
import block
import time
mc = minecraft.Minecraft.create()
while(True):
pt = mc.player.getTilePos()
mc.setBlock(pt.x, pt.y - 1, pt.z, block.BED.id)
When the code called for a rainbow Wool block to build a path, even in the Air, Steve could not get down. We fixed that by checking if the block was not Air before changing it. This created a Rainbow-footstep effect that the kids delighted in painting the world.
import minecraft
import block
import time
import random
mc = minecraft.Minecraft.create()
while(False):
w = random.randrange(0,15)
pt = mc.player.getTilePos()
stoodOn=mc.getBlock(pt.x,pt.y-1,pt.z)
if stoodOn != block.AIR:
mc.setBlock(pt.x, pt.y - 1, pt.z, block.WOOL.id,w)
Bolstered by that fun, they created a canon in the world and then run this Rainbow-Canon that cut through Trees and Mountains with impunity!
import minecraft
import block
import time
import random
mc = minecraft.Minecraft.create()
c = 1
while(True):
w = random.randrange(0,15)
pt = mc.player.getTilePos()
mc.setBlock(pt.x, pt.y, pt.z + c, block.WOOL.id,w)
c = c + 1
Cannot thank the Pycon and
Raspberry Pi Foundation enough. "Thank you!"