Showing posts with label CodeClub. Show all posts
Showing posts with label CodeClub. Show all posts

Thursday, February 19, 2015

Robot Club - fifth session completed


Full house this week.

Link to Fourth Session: http://winkleink.blogspot.co.uk/2015/02/robot-club-forth-session-completed.html

Full house and I  think everyone was ready for half-term.
A lot more boisterous and distracted than early on.

From the Preparing Blog post we were working with the line following sensor.

Line following sensorhttp://ebay.to/1wXWDKI£1.195£5.95

The weekend before I did some work with this sensor and rather than reflecting different amounts of infra-red light depending on the colour of the surface it is more responsive to changes in effectiveness. So, a matt black surface to a shiny white surface gives the highest contrast and so gives the best reading.
The sensor also has a very limited analogue range and really is a digital switch. Meaning if the contrast is large enough it returns a HIGH signal.

With this knowledge we discussed inputs and how up until now we have only been doing outputs. Sending signals from the Arduino to the motors, with no information coming from the robot to the Arduino.  So, we have no idea if the robot is bumping into things.

Using the whiteboard we went through the operation of the sensor and how to wire it up. VCC, GND Out. We wired it to Digital Pin 2.

Modified the code to add a pinMode(2, INPUT) to the setup and an if statement in the loop() to read the pin and for this session using the Serial Monitor display a message on the computer.

It took a while to work through this as with 5 kits there was some fun with the wiring and understanding the change in the program.  

As mentioned before rather than just having the kids type in a piece of code I'm trying to worth through the logic with them so that the process is understand and not just have the ability to copy/paste.

By the end all 5 robots were reading the sensor from digital pin 2 and outputting a message to the Serial Monitor.

We now have a 3 week gap. 2 Mondays due to half-term and an inset day and I'm unavailable for the following Monday.

For the next session I will get all the code so far to the same place for each group and we will modify the code to make the robot turn around when it gets near an obstacle. It should be fun seeing 5 little robots running around the floor turning when they get near to obstacles. 





Monday, January 12, 2015

Robot Club - first session completed

Link to Previous Post on Preparing for the Club with details on Partner Used: http://winkleink.blogspot.co.uk/2014/11/preparing-for-2015-after-school.html


Today we had the first session of the new robot club I'm running at my kids primary school.
It is for year 6, so 11-12 year olds.

The club is based on the parts from the previous post. http://winkleink.blogspot.co.uk/2014/11/preparing-for-2015-after-school.html

Today the kids came in and there were 3 from last year, so 7 new which is great.
Also, the gender mix is 4 boys and 6 girls.  Sounds very positive from a gender equality then heard the robot club is clashing with football, so expect there are many boys already committed to football.

Still it was a great first session.

The goal for today was to build the chassis.  I wanted to give the kids a bit of a challenge so we worked it out together using the Chinese instructions and my previously built chassis.

A lot of bolts going in the wrong way round and parts in upside down. So, each team had to take their bits apart multiple time.

As we went through the hour I expected the kids to lose heart with the every increasing times they had to remake the chassis.  But, I was delighted that by the end they were very excited to have it built and really wanted to do more.  We had to stop as parents were waiting to collect the kids.

We wired up some of the motors and I showed that since the motors mirror each other than with the motors wired the same way that one wheel goes forward and the other goes backwards with the same red-positive / black-negative wiring.  I explained we can sort this out in code.

The best comment of the day from one of the girls was. "Today is the first time I don't want to leave school."

She was very curious about the 4x4 keypad, so I explained how it works.
Send a signal into each horizontal pin one after another and seeing which pin it comes out at.

Metal Note: try to bring a white board market next time.  Teachers take them away after their classes.


In preparation for next week I have to get all the chassis sorted. One of the motors had the tab ripped off so lucky I have a spare motor.

Then add the L298N H-Bridge and Arduino Nano compatible so coding can start next week.

Goals for next session.
Understand the wiring.
Code to make it go forward, backwards and turn.
Program to go around the centre section in the room.

Roll on next Monday.




Monday, November 3, 2014

Preparing for 2015 after school computer club


Over the past 2 years I have done a Code Club at my kids school using Scratch and last year included a bit of Arduino. Now in the UK computing is part of the school curriculum so the Code Club learning is now done in school time meaning there is not need for it to be done after school.
With this in mind for 2015 I've decided to ramp up the difficulty and go Arduino all the way with a robot course.

This time limited to 10 kids working in pairs as the complexity is higher and the projects will most likely be done over multiple weeks.




This will give the ability to build everything from a pre-programmed robot to a line following robot or an object avoidance robot. Also included an infrared sensor and remote so the kids can make a remote control robot.

All going well the kids will also be able to decorate their robots with unique bodies to make them more exciting.

In addition to the parts below I also have 36 rechargeable AA batteries for the club.

I'm looking forward to January already.

Below are the list of parts I plans to have for the 8-9 week club. 5 kits

ItemeBay LinkPriceQTYTotal
Robot Deckhttp://ebay.to/10NBbMM£7.485£37.40
DC Motor H-Bridgehttp://ebay.to/1GeGZyY£1.555£7.75
Arduino Nano compatiblehttp://ebay.to/1rRgTrh£2.895£14.45
5 x Breadboard 400 tiehttp://ebay.to/1EcNoZs£9.491£9.49
Line following sensorhttp://ebay.to/1wXWDKI£1.195£5.95
10 x Ultra Sonic sensorhttp://ebay.to/1GeHwRl£8.991£8.99
Infrared sensor + Remotehttp://ebay.to/1A40r0N£1.355£6.75
Wires M-Mhttp://ebay.to/1tujL19£1.991£1.99
Wires M-Fhttp://ebay.to/1tSRIKe£1.991£1.99
Wires F-Fhttp://ebay.to/1tSRRxf£2.241£2.24
Keypad 4x4http://ebay.to/1wX1r4F£0.995£4.95
£101.95

Friday, December 21, 2012

Learning Scratch for CodeClub


I've signed up to run a CodeClub at my kids school from  January.
Before I received the official course work I thought it might be a good idea to actually try and make something with Scratch. So, I put together a simplistic shooter.

You can see it and download it from the Scratch Site.
Dragon vs The Ghosts
http://scratch.mit.edu/projects/winkleink/2847788


You can play the game in a browser as well if you don't want to install Scratch.

The game took about 2 to 3 hours to make using the built in graphics and sounds. With most of that time me just figuring out how to use Scratch.  For those who have experienced Scratch before I'd expect a game like this would take less than 30 minutes.

Also, I just saw that Scratch 2.0 is going into public beta on the 28th of January and that the Raspberry Pi Foundation are supporting work to improve Scratch's performance on the Raspberry Pi.
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=77&t=26361

It's looking good for Scratch.