The 10 lines of code initiative is a challenge to write code with only ten lines of code to encourage efficient coding, whilst still having fun - the choice of language is up to you. The video from http://www.amazingict.co.uk outlines the idea:
Here are a three simple Scratch projects only using 10 lines of code - very happy for someone to take and improve them, especially if you comment and share your results. Click on the Green Flags below to see them in action.
The code is available at https://scratch.mit.edu/projects/111834277/
The code is available at https://scratch.mit.edu/projects/110952076/
The code is available at https://scratch.mit.edu/projects/111835204/
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.
Monday, 30 May 2016
Wednesday, 23 March 2016
Rise of Rabbitsapien
A little more detail on my experience of PiCademy December 2015 and the project a few of us developed - RabbitSapien.
To have a go, you may have to have the following:
- The latest version of Raspbian, at the time of writing Jessie (https://www.raspberrypi.org/downloads/raspbian/)
- Import the following
- sudo apt-get install python-twython
- sudo pip3 install explorehat
- sudo pip3 install gpiozero
Rise of Rabbitsapien - A team of us put together a project of a robot with a rabbit (no other soft toys were available) with a Passive IR sensor in its belly; that carries out a set routine when movement is detected. All control by a Raspberry Pi via an Pimoroni Explorerhat.
It was also great to come away with some many resources both physical and activities. Thank you to the Pi Foundation for such a good experience.
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.All views are those of the author and should not be seen as the views of any organisation the author is associated with.
Sunday, 20 March 2016
Dark in Sonic Pi
I am not a musician but I do love playing/coding (not difference really) Sonic Pi and video (using Voila http://www.globaldelight.com/voila/index.php) so I came up with this, it was just fun to do.
Please someone take it and improve it.
use_synth :prophet
in_thread do
loop do
sample :ambi_choir, rate: 0.1, attack: 4, release: 4
sleep 10
end
end
in_thread do
loop 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
end
sleep 4
sample :ambi_drone, amp: 0.75, release: 3
sleep 8
sample :ambi_dark_woosh, amp: 0.75, release: 3
sleep 7
sample :ambi_dark_woosh, amp: 3, release: 6
sleep 6
sample :ambi_dark_woosh, amp: 3, release: 5
sleep 5
sample :ambi_dark_woosh, amp: 5, release: 4
sleep 4
sample :ambi_dark_woosh, amp: 5, release: 3
sleep 3
sample :ambi_dark_woosh, amp: 5, release: 2
sleep 2
sample :ambi_dark_woosh, amp: 5, release: 1
sleep 1
sample :ambi_dark_woosh, amp: 5, release: 0.5
sleep 0.5
sample :ambi_dark_woosh, amp: 5, release: 0.5

Dark by Scott Turner is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
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.
Saturday, 12 March 2016
3 'Art' Scratch Projects
Grid painting - Simple system that allows images made up on 8 x 8 grid. Click on the Green flag to start. For the code go to: https://scratch.mit.edu/projects/101415120/
Whirleygig 1 - straight random lines. Click on the Green flag to start. Foe the code go to: https://scratch.mit.edu/projects/99053538/
Whirleygig 2 - random lines. Click on the Green flag to start. For the code go to: https://scratch.mit.edu/projects/100924783/
The last two are loosely based on the idea of Generative Art. A good book, in my view, on this is available from Amazon at Generative Art
All views are those of the author and should not be seen as the views of any organisation the author is associated with.
Tuesday, 8 March 2016
Random picture Generator using Scratch
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.
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.
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
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...