Thursday 23 October 2014

CodeClub: TWSU DIY Gamer Week 6

This week everyone finished off their Gamers! The last components were soldered in place and the led matrices and chips were installed

I'd only managed to get one soldering iron working anywhere near decently. One has completely died and does not heat up at all. The other one refuses to tin despite having the tip well cleaned. I brought one of my soldering irons from home in so that there would be at least two working irons for the session.

Neither of the two Gamers completed today worked completely correctly first time. The red led would blink when the Arduino was loaded with the program from lesson 3 but when a game or animation was loaded - nothing.

On inspection one Gamer had a couple of wobbly solder joints which when re-made fixed the problem. The second took a bit longer to diagnose... until I noticed that the two chips had been inserted in the wrong sockets. We swapped them over and the full set of Gamers was now in operation!


Meanwhile the other pairs were either finishing off their animations (lesson 4) or starting work on controlling an animation using the light dependent resister (LDR) (lesson 5). I'd set my own gamer up running the code and it was good to demonstrate what they were trying to achieve before they started.

I particularly liked the Minecraft Creeper head in this animation:



There were plenty of issues with syntax errors in the code. The kids were often not reading the worksheets carefully and just skimming between the code snippets. Consequently they put lines of code in the wrong place or were getting things the wrong side of brackets.  This is all part of the fun/learning process and by the end a couple of the more intuitive programmers were started to get a feel for the Arduino code.

Things to do differently next time?


I should have demonstrated the whole process of monitoring the serial line to discover the range of values from the LDR. The instructions don't make it clear what you're trying to achieve at the start and a couple of pairs got confused about what the code they were writing was trying to achieve.

Check for swapped chips earlier!

Thursday 16 October 2014

CodeClub: TWSU DIY Gamer Week 5

It was another hectic session today, with different groups working on the activities from the worksheets for lessons 2 (soldering/assembly), 3 (first Arduino programming) and 4 (animation).

Only two groups have yet to finish their assembly.  I noticed today that the soldering seemed to be going slowly and there were complaints that the irons weren't working. On investigation I noticed that the tips on all three had a significant build up of black crud and were not tinning properly.  This is quite disappointing given that they were brand new and have only been used for less than 3 hours each.

I've taken the irons home to clean off the crud - I've done one so far and it is now tinning OK.

We also had the first major soldering hiccup today - one pair soldered their resisters in the wrong way round and then managed to break the leg off one while trying to desolder. That Gamer has come home too so that I can remove the debris. The whole area around that hole is now quite messy so I'll probably solder in a replacement resistor myself.

Meanwhile the other groups were whizzing through the animation steps and enjoying coming up with some funky designs. I decided to let everyone work on their own but this did make it difficult when both partners wanted to test their work on the Gamer and had to swap the unit between their computers.

One thing I'd noticed with my own Gamer was that the code generated by the Image Painter software tool typically resulted in a noisy, flickering image as the refresh rate of the Arduino is just too fast for the led matrix.


Simply adding delay(1) after the gamer.printImage(image) in the loop is enough to keep the output stable and this was actually a good way to get the kids to focus on the code when showing them this fix.



My most capable pair who have been steadily pulling ahead on the others came up with a great little animation that flashed their initials on the screen. They're ready to start on the LDR section nest week.


The Image Painter and Animation Generator are nice little apps and the kids got to grips with them without any real explanation or demonstration from me. I think the functionality of the Animation generator is a bit strange: the "add blank frame" and "duplicate frame" controls only insert a new frame at the end of the whole sequence so you can never go back and add a missing frame part way through (at least I can't see a way of doing that). I also don't really understand what the 'save animation' control does. On OS X it brings up the same dialogue as the 'load animation' control, which means it doesn't allow you to actually type a filename. Obviously you can save the raw code but I'd suggest this is a bug rather than a feature.

I also remembered to give out the certificates I made last week. Everyone seemed pleased and immediately asked when they'd get the Level 2 one.

Things to do differently next time?


Check the soldering irons before each session and make sure I've got some sandpaper handy at school to clean up any manky tips. 

Remember to hand out the animation planner sheets. I forgot today and even though it didn't seem to matter too much I think it would help to get the kids more focussed on the process itself. 

Thursday 9 October 2014

CodeClub: TWSU DIY Gamer Week 4

It works! Shouts of glee this week from a couple of the pairs as they connected up their soldered circuit board to the Arduino, uploaded a game and got to play it!


Everyone got to work straight away, eager to get stuck in to the soldering. It is great to see just how much their confidence and competence with the soldering iron has grown over the last few weeks.

I also explained that anyone waiting for a soldering iron should get out their Arduino and start on Lesson 3. Although a few seemed a little daunted by the wordiness of the first couple of pages, most quickly worked out what they needed to be doing (especially those who'd had a taster of Python last term). This was also where working in pairs helped as they were able to figure it out together.

I'd wondered if making a green led flash would be a bit underwhelming but when it worked they were really pleased and everyone else crowded around to marvel at the first pair's success.

Three groups finished all their soldering today. I think everyone struggled with fitting the ICs into the sockets - primarily because they were nervous about breaking the legs - and I had to do it for them. Fair enough - I'd rather that than have to try to get replacements.

Two groups got everyone done and then were able to connect their circuit board to the Arduino, Because it was now loaded with the "led flash" program, the chunky red led on the top of the Gamer immediately began to blink when powered up.  A nice first test.

Once I'd shown them where the Gamer library was to be found on the PCs, they were quickly able to select a game and try it out too. Although we didn't have time for exhaustive testing both groups' Gamers seemed to operate perfectly.

This was a real cause for celebration and there were plenty of high-fives.


Knowing that the children always liked the CodeClub certificates from the Scratch projects I knocked up a similar one which I'll hand out next week in recognition of their great work.  

I expect all the other groups will have finished their Gamer next week. 

Things to do differently next time?


Having children working on several different parts of the project simultaneously (soldering, assembly and 1st Arduino coding) was quite chaotic for a while. Fortunately once I'd helped sort out a couple of issues once they were all able to help debug each others' work. It also meant they those who finished assembly were able to reach a really satisfying point. So on reflection I'd probably do it this way again given the choice. 

There were a couple of very minor burns this week. Nobody seemed to mind though and claimed it wasn't hurting enough to warrant a trip to the bathroom to run it under the tap.  

As is usually the case when children become more confident at something, the potential for silliness increases. A couple of the girls discovered that melting the foam pieces used to protect the board  pins produced a nasty (and probably toxic) smell.  I had to quickly make it clear that further investigation of what other materials could produce interesting effects when put in contact with the soldering iron was not part of the project even if it possibly could be considered a valid scientific experiment. 

The DIY Gamer is much more involved than the normal CodeClub projects.  Simply the amount of physical preparation of the classroom and subsequent tidying up afterwards means there is a lot more work for me than just turning up with a bunch of photocopied worksheets. There's not much that can be done about that as it is the nature of the activity, but it definitely requires a lot more work on behalf of the volunteer. I also think I wouldn't want to run this as a first project with a group that I didn't already know. 

Thursday 2 October 2014

CodeClub: TWSU DIY Gamer Week 3

So this week the children who didn't finished their small led board last time did so at the start of the session. It was quite nice not to have a movie to watch or any group instructions to give first thing: the kids often arrive in dribs and drabs so it was good that they all had something to be getting on with straight away without waiting for everyone to arrive.

Those who had finished the little practice project got stuck into the DIY gamer board itself, assembling the components ready for soldering.


I'm pleased that I took the time to do the practice exercise, as everyone seemed really confident this week and on the whole, the quality of work was pretty high. Inspecting the joints it looks like most will be good enough to let the Gamer work when complete. There are a few larger than ideal blobs in places but nothing too dramatic. In fact some of the more competent children were able to spot when they'd used too much solder and use the solder sucker to make things better.  The best work was actually done by the only Year 4 attendee. To be fair he is also the only one to have ever done any soldering before, but nevertheless I'd be more than happy with the joints he made today if I'd done them myself.

By the end of the session most pairs had completed all the buttons and the LDR. Some had added the buzzer and started on the resisters. The main bottleneck is waiting for the soldering irons to be free. One pair in particular were quite slow - but their work was excellent - which meant that there were always more than half the group waiting.

No burns today, pretend or otherwise. The only minor mishap was that one clubber managed to slightly melt the cable of the soldering iron. The smell of singed plastic was actually a pleasant change from the pong of burning hair (one of the girls, despite having her hair tied back, managed to shed plenty of strands onto the hot soldering iron).

Everyone was keen and enthusiastic again today. It is clear that this sort of activity is unlike anything else they normally do at school and they are really enjoying it. There have been no problems working in pairs and sharing the soldering duties. They are all very sensible with the soldering irons and don't complain about wearing their goggles. In fact two of them had to return after the end of the session because they'd walked out with them still on their heads!

News of what is going on in CodeClub this term seems to have circulated nicely around the school. I've received and overheard several admiring comments from children and teachers alike.

Things to do differently next time

I did consider having everyone also start on lesson 3 (writing the first Arduino sketch) this week so that they could work on that while they're waiting for a free soldering iron.  However I'd then have to reload the games back on to each unit ready for testing when the soldering was complete so decided against that idea. I think I'll maybe do it next week though.

Open more windows to increase ventilation!