Friday, 23 November 2012

Fun with Lego WeDo and Scratch

Flushed with the success of reading external inputs from the PicoBoard into our Scratch projects I thought that we would take a look at outputs via Lego WeDo. This is Lego's Junior Robotics system designed for use in schools, but available for home use too. It mainly consists of a motor, a motion/distance sensor, a tilt sensor and a hub to connect to a computer.

Trouble is, at around £80 it's expensive and that does not include Lego's software (but you can use Scratch). The kit does come with instructions for 12 models which make full use of the included motor and sensors, but having taken a look at the plans I thought that my 11 year old son would probably prefer to experiment with his own creations.


Instructions for all of these models can be found at Ro-botica (probably also on the Lego site, but I couldn't see them) . The Ro-botica site is in Spanish, but all instructions are in English.

Besides, we have heaps of Lego at home already, including some older style 9V motors. So, being a cheapskate I opted to just purchase the USB hub for now as really we only want to experiment with motors. Still expensive at around £30 mind you.
The Lego WeDo USB Hub
It arrived and within minutes was connected up to our computer running Scratch. Selecting 'Edit', 'Show Motor Blocks' revealed the following extra blocks in the Motion section.


In order to use these blocks, the WeDo Hub expects a Lego Power Functions motor to be plugged in. But we don't own any. So, what next?

The Power Functions (PF) system is Lego's latest electrical system, replacing the 9V system which was introduced in the 1980s. PF is a four wire system and the older 9V system just used two wires; the connectors are not compatible.

Fortunately, one of the following PF extension cables can act as an adapter between the two systems. This allows older 9V system components to be connected into a PF system.

8886 extension cable 8871 extension cable
The dark grey connector at one end is a standard PF connector. The light grey connector is PF on the top and old 9V on the bottom. So, to connect an old 9V motor to the WeDo hub:

Connect the dark grey connector to the USB hub. And then connect the light grey connector either:

  • directly to the motor (if it has a connector on top like this one)

  • indirectly to the motor via an old 9V cable

  • or indirectly to the motor via an electric plate


Once I had connected the old motor I then played around with the Scratch controls, turning the motor on and off, changing the direction and changing the power. All worked as expected. However, bear in mind that the motor requires 9V to run at full power and the USB hub can only deliver a maximum of 5V.

I then tried a couple of other old 9V Lego components I had:

Electric Light & Sound Bricks: Town Siren + Twin Top Lights
On their own, these did not work when the motor control was activated from Scratch, but with the motor also connected I got sirens, lights and motor spin. And once current was flowing the motor could be taken off and the lights and sirens would remain on.

Now I don't pretend to know exactly what is going on here, but I suspect that the WeDo hub does not allow the current to flow unless there is something to draw enough current attached - maybe? Once current is flowing, you can disconnect the motor and still do things like change direction and power which result in dimming the lights and changing the siren tone. When you 'turn the motor off' from scratch the siren / lights go off and won't come on again without the motor connected.

So next, I thought that I would try putting a resistor in the circuit. I did this by cutting a 9V lead so that one end had the standard connector and the other was just two bare wires:

Adapted cable 5306b
A couple of crocodile clips, a resistor from my kids' snap circuits kit and bingo - lights and siren without the motor connected:



And, using the customised 9V lead, it can be connected to other non-Lego components. I have had success with MES light bulbs and other motors.

Not sure what we are going to do with all this knowledge, but my son has had some fun already. He created this Pirate Ship fairground ride (adapted from the Lego Wedo Ferris wheel instructions) and then I helped him add the lights. Unfortunately it is only possible to control 1 motor circuit from Scratch; I would have liked to have been able to use a separate circuit for the lights.




control for the pirate ship
Conclusions

I am glad that we have had the opportunity to play around with Lego WeDo and I think coupled with the PicoBoard my son can have plenty of fun programming and building. I may now buy a Lego Motion Sensor for him which will bring our total spend up to about £50, so the original £80 set starts to look like a good buy if you also need a motor.

I had hoped that we could use some plans such as from our Lego Inventor - Motion Movers set, but the 5V restriction does not give enough power to drive the models that I have tried so far.

It is a pity that only one motor circuit can be controlled from Scratch. However, it does look like there is a workaround by building a customised Scratch image. Instructions available here on the Scratch Forum, but I haven't tried them yet.

Be careful with any customisations, as I cannot guarantee that any of the above procedures will not damage your USB hub and/or computer.

Tuesday, 13 November 2012

Computing at School


I am delighted and impressed to hear that my son's primary school is introducing Scratch into the ICT curriculum for Year 6.
"In our first ever Computer Science based unit of work, the children will be learning the fundamentals of programming using an online programming language – Scratch. They will invent a new platform game with their skills and test each other’s games. This is a fantastic new area for the school and one which will really challenge your children’s problem solving skills. If they would like to continue to explore this area of work at home, you can download the Scratch program from the following website:
http://info.scratch.mit.edu/Scratch_1.4_Download
It is free to use and great fun for all the family!"
Coincidentally I had just introduced Scratch to him myself and he loves it. He started by just playing around with the program and then I gave him the following book, which I thoroughly recommend.


With this he has been able to follow instructions for ready made programs. He has then adapted them and introduced concepts into his own games. This is how I got started back in the 1980s on a Commodore Vic20 - typing in pages of code from magazines.

Scratch can also be used to control and interact with external devices via a Lego Wedo USB hub and/or a PicoBoard. And to make the homemade games feel a little more authentic, standard USB games controllers can be used via the fantastic Joy2Key program.

I have several projects in mind for my son to assist with and will report back with our results. In the meantime, I am about to fire off a letter to the school offering my help with this exciting development.

Introducing programming such as this into primary schools requires a teacher or two that are very 'e-confident' and I feel very lucky that my son's school has such teachers. If you would like to see such innovation in your own child's school, then check out Code Club which is busy setting up "A nationwide network of volunteer-led after school coding clubs for children aged 9-11".

Sunday, 11 November 2012

Tangram Animation

Whilst tidying up the hard drive on my computer I came across a number of half baked animation projects from some sessions I ran at my kids' junior school. One of the projects was this simple tangram animation which was filmed on a Digital Blue camera by some 9 year olds.

As we only had a couple of cameras at the time, this project worked well in a round robin fashion with each child being able to choose the tangram character they wished to animate. I think we did create a longer film, but I don't appear to have that at home.


I've decided to give the project a makeover, this time by lighting from below to give the effect of a shadow play. I've experimented with this style before using a Digital Blue camera, but I wanted to see if there were any improvements that could be made now that I have upgraded to a Microsoft Lifecam camera and ZU3D software. Here is the result:



The technique involves mounting the camera above a lightbox. The lightbox I use is small (size A4) but perfectly adequate and ideal for use with children. For more details please see my website, here.

My animation station!

In the past I have cut out the foreground scenery from black card and stuck it directly onto the lightbox. However, the ZU3D software allows images to be imported and placed on a separate track to your stop motion frames. This has made things a whole lot easier. It also means that more elaborate scenery can be designed. I created this background image in GIMP (the white parts are actually transparent) and saved it as a PNG file sized 640 x 480 pixels to match the default dimensions for my camera in ZU3D.

Scenery - click to enlarge, save and then import directly into your project.

 and then imported it into ZU3D:


I then added another video track below the scenery and started to capture frames. The green hue was provided by green cellophane placed on the lightbox (we didn't use this in the end). I used to be able to get a similar effect using the Digiblue's software, but I can't seem to find such a feature in ZU3D. Oh well, you win some, you lose some!


I have been so pleased with the way that this has turned out and hope to come up with some more project ideas for the future.

The small tangram characters were all printed onto black card and cut out. This can be tricky to see, especially for a child; an easier method is to print onto white paper and then transfer to the card by rubbing white crayon or pencil onto the back.

Here are all of the characters used in the film - right click to save. Searching on the internet will reveal lots more that you can copy.


And here is the tangram square used to create the transformation animations:

Right click, save and print onto black card.





Saturday, 10 November 2012

The ideal lunch box system

 

I've been packing lunches for my kids for the past nine years. Like most parents, I started out with an insulated lunch box like the ones above and filled it each morning with such things as cling film wrapped sandwiches, a piece of fruit, and a yogurt. Each afternoon it would come back smeared with a cocktail of crumbs, yogurt, banana skin and apple core - yukk! And however carefully you sponge clean these things, after a few weeks at school they take on an unpleasant aroma that is hard to shift.

So I went on the lookout for something else to contain the lunch that would be easier to clean.

Inspired by the laptop lunch idea which consists of an insulated bag and bento style containers I assembled a cheaper alternative using things readily available in the UK at the time. And here it is:


  • Insulated lunch bag - the standard rectangular bag found in most supermarkets, John Lewis etc. Approximate size 23 x 20 x 6cm. 
  • Addis Clip and Close 1.1l with inserts - available in Robert Dyas, Tesco and online. It has one main compartment (great for sandwiches, pasta, rice etc.) and two side compartments (salads, snacks, puddings etc.)
  • Sistema twist n sip 330ml bottle - available in most supermarkets and online.
  • Mini lidded storage pot, approx 100ml - the one shown was made by Buchsteiner and was purchased at Lakeland. Similar available on ebay - search for 'mini storage pot'.
  • Bento accessories - lots of small coloured pots available on ebay along with rice moulds, egg moulds, picks. I occasionally make use of these for ketchup, mayo and dips.
I have four of the main containers, two of which I have had for more than six years and they are still going strong (except for one broken flap caused by forcing the container shut with an apple inside). The containers all go through the dishwasher without problems (some minor warping has occurred to the inserts). The insulated lunch bag stays fresh and can survive at least a couple of years of use (my kids are trained to stick all their rubbish inside the container and to shut the lid). And I hardly ever use cling film now.

A typical lunch - tuna mayo pitta, cherry tomatoes, yogurt with fruit, water. No cling film for this one.

The main container has a leak proof seal and I have never had one fail. However, the inserts do not create a tight seal against the lid, so it is possible for food to transfer from one compartment to another. For most foods this is not a problem and for the others I just wrap some cling film over the top.

Sadly the smaller pots pictured are no longer manufactured. I found some very similar pots on ebay, but they have not been quite so reliable and we have had some leakage. So the hunt continues for a suitable alternative.

Having got the lunch box system sorted, what should you pack in it? Here are a few ideas - more coming in future posts.

Sushi
Pizza
Sandwich
Tortilla
Fruit Salad
Bananas & custard
Sausages & ketchup
Lamb kofte & tzatziki

Tuesday, 6 November 2012

Adding sound to wall displays

Each term, my son has to complete a 'project board' on the topic his class has been studying. He is provided with a piece of card (size STRA2) which he is expected to fill with mounted pieces of writing and artwork relevant to the topic. He is also encouraged to 'be CREATIVE'. This usually means some form of interactivity, a game for instance.



For his last project board on 'Rainforests' I bought a sound module like you find in some greetings cards and he created a 'lift the flap for sounds of the rainforest' element.



As this went down well last time (especially with his peers), he asked for another one for his 'World War 2' project board.

They are very simple to setup. Here are instructions for creating your own 'lift the flap for the sound of ...': You will need a recordable sound module such as this, a piece of card cut according to the template and some thin double sided sticky tape. For the card, we used an old folder.

  1. Cut out the card and fold where indicated.
  2. Choose and record your sound according to the instructions provided.
  3. Carefully stick your sound module onto your card.
  4. Cut two strips of double sided sticky tape and apply:

  1. Fold bottom flap to cover the sound module.
  2. Add writing and artwork.


As the modules are re-recordable, it may be possible to re-use them for future displays but I have not tried this.

Friday, 15 June 2012

Feltboard Fun


A felt board (also known as a flannel board) is simply a board covered with felt on which a child or an adult can place felt pieces to make pictures or tell stories. Felt boards are available to buy in a variety of sizes. Small boards are ideal for play alone activities (fuzzy felt boards for example) and larger boards are designed for teaching and storytelling. My children enjoyed listening, participating and telling their own stories using a felt board.

Here is my daughter, aged three with her version of "Goldilocks and the Three Bears".





I made my own large storytelling felt board using stiff cardboard which I covered with green furry sticky back plastic (bought in Focus Do It All). I sized the board to fit on my children's art easel (Early Learning Centre). The giant felt pieces were made with the help of my computer and the following:
  • T-shirt transfer paper
  • Thin white felt
  • Graphics application (MS Paint will do)
  • Scanner (optional)
  • Iron
The basic technique involves printing a set of images onto T-shirt transfer paper and then transferring the images onto the felt using a hot iron. Once cooled, the backing paper is removed and the individual images are cut out.

First prepare the images you wish to use as felt pieces. For this you will need a graphics application such as MS Paint or GIMP. Images can be sourced from the internet (clipart for example) or can be scanned in (images from story books for example). However the images are generated they all require the same treatment.

First consider the size of the images. If using them for storytelling then the larger the better up to a maximum size of about 15cm square (any larger and you may find them difficult to keep on the board). For table top felt boards smaller pieces work better.

The next thing to consider is how they will be cut out. Intricate shapes are extremely difficult to cut accurately and may be best left with a border of about 2mm. For this to work, it is necessary to crop the image carefully in the graphic application so that the finished felt piece has a white border around it. Shapes that can be cut accurately from the felt do not need such careful cropping in the image editor as the real scissors will do this for you; so don't waste time picking the image out in the graphics application.

Once you are happy with the images you wish to use, squeeze as many of them as you can into a single image the size of the transfer paper. This will minimize paper wastage. Print a low resolution test page on ordinary paper to check all is as expected. If the test page is okay then load the transfer paper, adjust the printer settings for T-shirt transfer paper and print.

Hints:

The transfer method results in a mirror image of your artwork so make sure anything that is reflection sensitive (in particular text) is reversed before printing.

I have found no problem with roughly cutting the images to size from the transfer paper and then individually ironing them onto the felt; removing the backing paper is a little tricky.

The surface of the felt pieces will be shiny and so trying to stick felt pieces on top of each other will not work.

Friday, 4 May 2012

Scrapbooking for kids

I heard on the radio today that it is National Scrapbooking Day. Although not a scrapbooker myself, it is something that I have very much enjoyed doing with the children over the years. In my daughter's case we have about ten years worth of scrap stuck down on a month by month basis.

For us, it all started when my daughter was about two. I was queuing to pay my paper bill in the local newsagents when a  cheap scrapbook caught my eye. It was one of those sugar paper books that I remember having as a child. I bought it and we spent the afternoon making a page entitled "Things I like".

There have been many more pages since. My children are now 12 and 10 and scrapbooking sessions have become less frequent,  but one thing they really enjoy is looking back on all the stuff from their early years. Between them they have created wonderful books full of photographs, artwork, diary entries, scribblings and lots more besides. So here are my tips for encouraging young children to engage in this satisfying hobby.


  • Don't get too hung up on the results. Since starting scrapbooks with my children I have discovered there is a whole world of adult scrapbookers out there producing beautiful, coordinated and professional looking pages of memories. For young children, the results don't matter so much, it is the joy of collecting, cutting and pasting that drives them. Let your child develop her own way at first and as she matures introduce more sophisticated ideas if you wish.
  • For very young children start with stickers, as even glue sticks can be difficult to handle. These can be either commercially made stickers or even better home made stickers. Stickers can be made on the computer (using photographs, clipart or things you have scanned) and printed onto sticker paper. Or they can be made in a sticker machine.
  • If your child isn't confident with scissors, cut everything out yourself in advance (children can stick quicker than you can cut) and let them choose what they want to put in.
  • Make use of technology. Create titles in Microsoft Wordart. Find topic relevant clipart. Scan or photograph your child's oversize artwork and reduce it to scrapbook friendly size.
  • Put your digital camera to work. Take pictures of your child's play dough creations, his lego models, his favourite toys, even his grazed knee. Anything they consider important will do. You don't have to print them onto expensive paper for this kind of scrapbooking. And take advantage of the digital camera's immediacy by printing off those pictures of the zoo when you get home so that they are ready to stick in the next day.
  • Save entrance tickets, leaflets, napkins, sweet wrappers; anything that is flat and can be stuck down. And if things aren't flat collect them anyway as you can always photograph them for the scrapbook.
  • Encourage your child to talk about what they are adding and to later write a few words.
  • Make use of wallpaper and fabric samples.
  • Save wrapping paper.
  • Buy glue sticks in large quantities.
  • Introduce a few scrapbooking and card making supplies for special pages like birthdays and christmas. 
  • Use children's stamping kits to make borders and backgrounds.
  • Buy some paper punches in various designs - children can work these by about the age of six.
  • Buy some child size fancy scissors.

Most of all have fun.

Monday, 16 April 2012

Botanical illustration without the drawing

A page from the Observer's book
Out on a cycle ride the other day the kids and I were trying to identify some of the flowers springing up in the hedgerows using "The Observer's Book of British Wild Flowers". It was my mother-in-law's book and has an inscription dated 1948 in it. It is full of small but beautiful illustrations.

I love this kind of botanical illustration and was reminded of my attempts to recreate "The Country Diary of an Edwardian Lady" (Edith Holden) back when I was about twelve.

My attempts failed at the first page when I realised that neither my artistic talents nor my handwriting were going to produce anything resembling the charm of said book.

Project shelved.


Thirty odd years later and I was wondering whether technology could help the less able artists among us (including my own children) produce a nature diary incorporating a bit of the charm of Edith Holden's diary. Here is one of our efforts of a forget-me-not from the garden.

Our modern botanical print
And here is how it was done. You will need:
- Sugar Paper (yellowish to look like parchment)
- A source of small flowers
- Paper glue
- Plastic tweezers (optional)
- Scanner, computer and image editing software

1. Pick a flower as low down as possible so as to include the leaves.
2. Spread paper glue thinly onto an area of the sugar paper roughly the size of the flower to be stuck down.
3. Carefully stick the flower and leaves onto the glue. A pair of plastic tweezers is useful here. Wait for glue to dry.
4. Place picture in scanner. Scan and import into image editing software (we used GIMP which is free).
5. Crop and add a caption using a font that looks like old fashioned script.
6. Print and stick into your nature diary / scrapbook.

I'm really pleased with the results and it's a good alternative to flower pressing.

A page from Edith Holden's diary
Something to aim for? Not sure how we are going to get the butterflies under the scanner though!

REMEMBER If you are picking flowers in the wild, only pick flowers of commoner species. It is the flowers that produce seeds and without seeds there can be no future generation of flowers. Widespread picking of flowers seriously threatens seed production. Many wild plants are protected species because of their rarity. It is an offence to pick any of these.