This short post is about a simple idea that was turn into a Scratch solution. I had developed a computational thinking based paper game with my son around following an algorithm to draw lines randomly using dice to select direction and length of the line.
Here is a Scratch program to do something similar. It is random in three ways
- The time taken is random.
- The direction is selected randomly
- the length of the line is selected randomly
To run it just press the green flag.
Go to https://scratch.mit.edu/projects/99053538/ for more details.
Go to https://scratch.mit.edu/projects/100957552/ for more details.
Go to https://scratch.mit.edu/projects/100924783/ for more details.
Go to https://scratch.mit.edu/projects/101630166/ for more details.
All views are those of the author and should not be seen as the views of any organisation the author is associated with.
A blog concerned with computational thinking at all levels; problem-solving and creativity in computing.
Tuesday, 8 March 2016
Thursday, 3 March 2016
Best coding games for kids: programming toys to teach children how to code - Test Centre - PC Advisor
Best coding games for kids: programming toys to teach children how to code - Test Centre - PC Advisor:
SAM Science Museum Inventor Kit Labs Toy
Sphero SPRK
This is the only one on the list I have actually played with. Fantastic device and as well the software you download from the manufacturer, there are some other bits of software you can download for it. My particular favourite is the TickleApp because it allows programming control of the sphero's but also other devices such as some of the Parrot drones. The BB-8 Sphero is great fun as well.
ThinkFun Code Master Programming
STEM - Robot Mouse Activity Set
https://www.learningresources.co.uk/product/stem-coding-set.do
Robot Turtle Game
Kamibot
https://www.kickstarter.com/projects/kamibot/kamibot-teach-your-kids-to-code
To read more of the original article go to: http://www.pcadvisor.co.uk/test-centre/gadget/best-coding-games-for-kids-3635899/
'via Blog this'
All views are those of the author and should not be seen as the views of any organisation the author is associated with. The recommendations made in the article http://www.pcadvisor.co.uk/test-centre/gadget/best-coding-games-for-kids-3635899/ are theirs and not necessarily those of the blog author.
SAM Science Museum Inventor Kit Labs Toy
Sphero SPRK
This is the only one on the list I have actually played with. Fantastic device and as well the software you download from the manufacturer, there are some other bits of software you can download for it. My particular favourite is the TickleApp because it allows programming control of the sphero's but also other devices such as some of the Parrot drones. The BB-8 Sphero is great fun as well.
ThinkFun Code Master Programming
STEM - Robot Mouse Activity Set
https://www.learningresources.co.uk/product/stem-coding-set.do
Robot Turtle Game
Kamibot
https://www.kickstarter.com/projects/kamibot/kamibot-teach-your-kids-to-code
To read more of the original article go to: http://www.pcadvisor.co.uk/test-centre/gadget/best-coding-games-for-kids-3635899/
'via Blog this'
All views are those of the author and should not be seen as the views of any organisation the author is associated with. The recommendations made in the article http://www.pcadvisor.co.uk/test-centre/gadget/best-coding-games-for-kids-3635899/ are theirs and not necessarily those of the blog author.
Sunday, 28 February 2016
Teaching social AI with robots and chatbots
I managed to do something I have want to do for a long time this week, thanks to the recent purchase of NAO robots by the University of Northampton, I have managed to include a physical example of Social Robots into my teaching. The aim of the session was to teach about social AI, revolving around the using social cues, to a certain extent, using natural language through chatbots, for us to communicate with machines.

The robots were used as an example of a social robot, the way we want to play with or work with them, without having to going through a steep learning curve on how to use them. Students were encouraged to consider why this was and that anthropomorphisation plays a part (NAO basically has some of the characteristics of a small child). The fact that it responds to voice commands, its looks, has a childlike voice, that it always moving (even slightly when standing) and the way it moves; were spotted by the group as ways it attracts us to it - it is really hard not to talk to it like a child sometimes (but perhaps that is just me).
To read more on AIML go to http://www.alicebot.org/aiml.html
Example chatbots
- ALICE http://alice.pandorabots.com/ (the one shown in the picture above).
- Mitsuku http://www.mitsuku.com/
- An example of an MSc student's work on Chatbots http://computingnorthampton.blogspot.co.uk/2013/10/msc-student-work-chatbot-innovative.html
- A good source of further examples can found at https://www.chatbots.org/country/uk .
If you would like to create your own chatbot personally I think one of the easiest ways to start is through https://playground.pandorabots.com/en/quickstart/
All views and opinions are the author's and do not necessarily reflected those of any organisation they are associated with
Tuesday, 2 February 2016
5 tools to get kids coding | Web design | Creative Bloq
Creative Bloq put forward 5 tools to get kids coding | Web design | Creative Bloq: 'via Blog this'
I have only played with two of those suggested and they are fun.
Hello Ruby
Ozobots - programmed through light, and can react to patterns on a track to change actions.
Third one, Hackaball is on order - it is, at the time of writing, a Kickstarter project details can be found at https://www.kickstarter.com/projects/hackaball/hackaball-a-programmable-ball-for-active-and-creat
All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.
I have only played with two of those suggested and they are fun.
Hello Ruby
Ozobots - programmed through light, and can react to patterns on a track to change actions.
Third one, Hackaball is on order - it is, at the time of writing, a Kickstarter project details can be found at https://www.kickstarter.com/projects/hackaball/hackaball-a-programmable-ball-for-active-and-creat
All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.
Friday, 1 January 2016
Simple X-Wing in Minecraft
| figure 1 |
It builds on ideas from the book Adventures in Minecraft (see link at the bottom) on using Python and Minecraft using a Raspberry Pi.
1. Static X-Wing
To start with we just placed the X-Wing above the player by placing blocks in the shape (roughly) of the X-Wing.
- Find the position of the player;
- To avoid building on top the player the starting position of the X-Wing is set by:
- add 5 to the x position of the player;
- add 10 to the y position of the player(The bit I have to keep reminding myself is the y-axis is vertical.);
- add 5 to the z position of the player;
- Using these values build using, Wool blocks, the X-Wing - 0 for white, and 14 for red blocks.
It is admittedly quite a simple code (see below) and the finished X-Wing can be seen in figure 1.
from mcpi.minecraft import Minecraft
from mcpi import block
mc=Minecraft.create()
pos=mc.player.getTilePos()
x=pos.x+5
y=pos.y+10
z=pos.z+5
mc.setBlock(x,y,z,block.WOOL.id,0)
mc.setBlock(x-1,y,z,block.WOOL.id,0)
mc.setBlock(x-2,y,z,block.WOOL.id,14)
mc.setBlock(x-3,y,z,block.WOOL.id,0)
mc.setBlock(x+1,y,z,block.WOOL.id,0)
mc.setBlock(x,y+1,z,block.WOOL.id,0)
mc.setBlock(x+1,y+1,z,block.WOOL.id,0)
mc.setBlock(x+2,y,z,block.WOOL.id,0)
mc.setBlock(x+2,y+1,z,block.WOOL.id,0)
#wings
mc.setBlock(x+1,y+2,z-1,block.WOOL.id,14)
mc.setBlock(x+1,y+2,z+1,block.WOOL.id,14)
mc.setBlock(x+1,y-1,z-1,block.WOOL.id,14)
mc.setBlock(x+1,y-1,z+1,block.WOOL.id,14)
mc.setBlock(x+1,y+3,z-2,block.WOOL.id,0)
mc.setBlock(x+1,y+3,z+2,block.WOOL.id,0)
mc.setBlock(x+1,y-2,z-2,block.WOOL.id,0)
mc.setBlock(x+1,y-2,z+2,block.WOOL.id,0)
2. Get it to move.
We want it to move across the screen, for the moment, happy for it to just be animated.
The block approach is ok for the static version, but could lead to mistakes with getting the co-ordinates right if we were not careful. There is an other option to be found in chapter 8 of the book of using MinecraftShape were the shape is defined as relative values to a starting block, so for what we were doing they don't change but the shape can move in across the world.
- Essentially the same as before but using shape;
- place the shape in the world;
- move it vertical (looks like it is taking off);
- move it horizontal (this bit can be seen in the video).
from mcpi.minecraft import Minecraft
from mcpi import block
import mcpi.minecraftstuff as minecraftstuff
import time
mc=Minecraft.create()
xPos=mc.player.getTilePos()
xPos.x=xPos.x+5
xPos.y=xPos.y+5
xPos.z=xPos.z+5
xWingBlocks=[
minecraftstuff.ShapeBlock(0,0,0,block.WOOL.id,0),
minecraftstuff.ShapeBlock(-1,0,0,block.WOOL.id,0),
minecraftstuff.ShapeBlock(-2,0,0,block.WOOL.id,14),
minecraftstuff.ShapeBlock(-3,0,0,block.WOOL.id,0),
minecraftstuff.ShapeBlock(1,0,0,block.WOOL.id,0),
minecraftstuff.ShapeBlock(0,1,0,block.WOOL.id,0),
minecraftstuff.ShapeBlock(1,1,0,block.WOOL.id,0),
minecraftstuff.ShapeBlock(2,0,0,block.WOOL.id,0),
minecraftstuff.ShapeBlock(2,1,0,block.WOOL.id,0),
minecraftstuff.ShapeBlock(1,2,-1,block.WOOL.id,14),
minecraftstuff.ShapeBlock(1,2,1,block.WOOL.id,14),
minecraftstuff.ShapeBlock(1,-1,-1,block.WOOL.id,14),
minecraftstuff.ShapeBlock(1,-1,1,block.WOOL.id,14),
minecraftstuff.ShapeBlock(1,3,-2,block.WOOL.id,0),
minecraftstuff.ShapeBlock(1,3,2,block.WOOL.id,0),
minecraftstuff.ShapeBlock(1,-2,-2,block.WOOL.id,0),
minecraftstuff.ShapeBlock(1,-2,2,block.WOOL.id,0)]
xWingShape=minecraftstuff.MinecraftShape(mc,xPos,xWingBlocks)
for count in range(1,20):
time.sleep(0.1)
xWingShape.moveBy(0,1,0)
for count in range(1,40):
time.sleep(0.1)
xWingShape.moveBy(-1,0,0)
xWingShape.clear()
The very shaky video below shows the X-Wing moving across the sky.
3. Where next
Two areas:
- Control: either through keys or by using external controls.
- Getting turning to work, we will looking into where this has already been done (and for Star Wars ) at http://www.stuffaboutcode.com/2015/03/minecraft-star-wars.html and http://www.stuffaboutcode.com/2015/12/minecraft-microbit-and-x-wing.html
All views are those of the author and should not be seen as the views of any organisation the author is associated with.
Wednesday, 30 December 2015
playing with Sonic Pi
If you haven't played with it SonicPi (http://sonic-pi.net/) is well worth a go, it combines programming, computational thinking and music (or trying to create music in my case). Raspbian on the Raspberry Pi has it as standard, but is great that SonicPi is available on the Mac and PC as well.
Here is an simple (if I am honest, because of a lack of musical ability) piece I have been play with. You can end up playing for hours trying out different sounds, synths, effects etc.
in_thread do
loop do
sample :ambi_choir, rate: 0.1, attack: 4, release: 4
sleep 10
end
end
2. times do
sample :bass_trance_c, amp: 0.75, release: 3
sleep 2
sample :bass_trance_c, rate: 0.5, amp: 0.5, release: 5
sleep 4
sample :bass_trance_c, rate: 0.3, amp: 0.25, release: 9
sleep 10
end
Here is the sneaky bit, even in the code above there a mixture of threads, loops, sequences as well designing of the 'shape' of the sounds.
There is also a community producing material/examples. For example at https://gist.github.com/rbnpi/7713ac59ed553d3f336e you can find code for the Star Wars theme. It is very hard to resist playing with the theme and adding drums, etc.
There are some great tutorials available on The MagPi magazine site https://www.raspberrypi.org/magpi/issues/
All views are those of the author and should not be seen as the views of any organisation the author is associated with.
Here is an simple (if I am honest, because of a lack of musical ability) piece I have been play with. You can end up playing for hours trying out different sounds, synths, effects etc.
in_thread do
loop do
sample :ambi_choir, rate: 0.1, attack: 4, release: 4
sleep 10
end
end
2. times do
sample :bass_trance_c, amp: 0.75, release: 3
sleep 2
sample :bass_trance_c, rate: 0.5, amp: 0.5, release: 5
sleep 4
sample :bass_trance_c, rate: 0.3, amp: 0.25, release: 9
sleep 10
end
Here is the sneaky bit, even in the code above there a mixture of threads, loops, sequences as well designing of the 'shape' of the sounds.
There is also a community producing material/examples. For example at https://gist.github.com/rbnpi/7713ac59ed553d3f336e you can find code for the Star Wars theme. It is very hard to resist playing with the theme and adding drums, etc.
There are some great tutorials available on The MagPi magazine site https://www.raspberrypi.org/magpi/issues/
All views are those of the author and should not be seen as the views of any organisation the author is associated with.
Sunday, 27 December 2015
Have a Sphero BB-8 - now what?
Previously I have shown the Sphero BB-8 rolling around the room under its own control, under the control of Sphero's own software - which has some fantastic features, I especially like the Augmented Reality message replicating the holographic projection in the film. At the time of writing (27th December 2015) this was number one best selling robot toy and 14th best toy overall in Amazon.co.uk toy list that day. The video below is the Sphero BB-8 Droid
But what is you want to take it a little further? What if you bought it and now want to program it?
One of the features of this device is it is programmable; and there is more than one option, two are presented in this post.
First option, by one of my favourite apps - TickleApp which has been discussed in previous posts. This app allows control of a quite an impressive range of devices using the same interface. Examples, some of which have been discussed previously (e.g Parrot Minidrone or Dash and Dot), are shown below - including Sphero BB-8.

- Spin twice for one second;
- Move roughly in a square;
- If the BB-8 collides (or is bumped) it is set to spin twice for a second.
Ok, not the most sophisticated bit of coding; but it does demonstrates the simplicity of controlling this robot with the app.
BB-8 is great fun, and with the head appearing to float over the body and facing in the direction of movement it is hard resist. The video below shows it action.
The Tickleapp is not the only alternative software, the Tynker App can also control it.
This is also a graphical drag and drop programming tool, that you can connect certain 'toys' to. Though the App, like Tickle, is mainly concerned with developing programming skills, the ability to add physical device is an enhancement.
The BB-8 can be connected to Tynker (or how I did it anyway) by:
- Clicking on the Create button on the opening screen;
- Clicking on Blank Template;
- Deleting the 'Actor' that has there and clicking on the + button in the top right hand corner of the screen;
- Clicking on connected toys and selecting the grey ball;
- On the main screen it should say spherobot with a code button at the side, click on the button;
- You should get a screen with some code for changing the colour shown and then moving in a square- you can change this for your own code.
Not all the commands, listed down the side, will work with the BB-8 - I restricted myself to the ones under common (star in the list). The Tynker app is a nice tool anyway with lots of games related activities to try. Having the ability to connect and program certain devices is a benefit.
Personal note, if you have one of these toys I would say give programming them a go.
If you have comments or experiences with Tynker, Sphero BB-8 or Tickle app please add them to the comments below.
All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.
Subscribe to:
Posts (Atom)
Answers not on the Screen
2. The answers not on the screen Hill, G. , Turner, S. J. and Childs, K. (2017) Abstract: Reflection from two areas on the issues...




