Week 8 in ScratchPiBot Club

Previous Weeks

Eureka!  We have 2 ‘bots that can follow a line for 3 metres!

The boys managed to get theirs to do it first as myself and the girls were embarking on raising the height of their ‘bots IR Sensors as when they got too close to the ground – they gave faulty line detection results.

Once we done this (and made our turning strategy quite aggressive!) the girls ‘bot zig-zagged its way down their track as well.

Boys Code Girls Code
boys girls

So we should be ready to have a set of races next week and see who can push their ‘bot the fastest without losing its way.

As not everyone can be programming the computers at the same time, the other club members have grabbed some flip cams and started filming the runs so hopefully we will have some video to show you next week.

Week 7 in ScratchPiBot Club

Previous Week

Both Bots have now got a pair of IR Line Sensors mounted on them 🙂

We purchased a roll of plain wallpaper lining paper and  made a couple of 3 metre runs with a black line down the middle using some insulation tape.

We tried using the same technique as the bot simulator from last week and managed to get the boys robot to steer its way down the track but it was more luck than programming.

The girls tried their robot out using the same piece of Scratch code but their robot had a different make of sensor and had a bit of trouble detecting the difference between the white paper and the black tape and weren’t so successful.

Next week, we will hopefully combine the ultrasonic sensor with the line follower and get the robot to turn around at the end of the track and come back again.

Parts List for a ScratchPiBot Mk1

All links are for information and not an endorsement of that supplier 🙂


Nano Wifi http://www.ebay.co.uk/itm/390420390335

Magician Chassis https://www.sparkfun.com/products/10825

HRC-04 Ultrasonic Range Finder http://compare.ebay.co.uk/like/120894421581?var=lv&ltyp=AllFixedPriceItemTypes&var=sbar&adtype=pla&crdt=0

Pebble SmartStick (Power for RaspberryPi) http://www.amazon.co.uk/Veho-Smartstick-Emergency-Portable-Blackberry/dp/B0063W8XKS/ref=sr_1_1?ie=UTF8&qid=1353264577&sr=8-1

ULN2003a http://www.cpc.co.uk

1x Breadboard http://www.ebay.co.uk/itm/New-240-Point-Solderless-PCB-Breadboard-Bread-Board-8-5mm-SYB-46-/180766987863

Male-Male and Female-Male Wires http://www.phenoptix.com/collections/breadboards-and-prototyping/breadboard

IR Sensors (not yet tested)  http://www.ebay.co.uk/itm/2x-Robot-Infrared-Sensors-Black-White-Detector-IR-Line-Follower-Arduino-PIC-Pair-/120990563177

4xAA Batteries (for Motors)

BluTak to hold things onto chassis

2.1 (or 2.5 – i forget which one it comes with) mm power socket to connect up motor battery pack to breadboard http://www.maplin.co.uk/dc-power-line-sockets-43091


Week 5 – ShrimpingIT Maker Club

Previously in Maker Club

The PIR Sensors have still not arrived 😦

So, we carried on using S4A, coding up on the main class computer connected to a projector so everyone could join in.

We made a simple script

When the Green Flag is pressed
….Wait until Digital Sensor 2 is pressed
….Play Drum for 0.5 Beats

and then everyone had a go at trying to get past the alarm and touch an object behind it- 3 people managed this out of 10.

So then we discussed what extra facilities an alarm needs and the first thing it needs is a arming switch, a disable switch (we used the same one) and entry and exit delays.

The club members wanted a keypad but were happy to have a hidden arming/reseting switch to start with.

We had suggestions that the alarm should sound when triggered for say 20 secs but then go silent but have a latched LED.

But we didn’t have enough time to implement this so that’s for next week.

The club members correctly identified that we couldn’t reallty use S4A for the final project but were happy with the concept that it was a good tool for prototyping.

One thing learnt from this – make sure all bits available and tested and all software installed before club commences 🙂


Week 6 in ScratchPiBot Club

Previous weeks

Week 6
We finally did it- 2 ‘bots running across the floor at the same time 🙂  I setup one of the line-follower IR sensors on a standalone Pi and 2 club members went and printed off a zebra crossing pattern on a piece of paper and played with passing it in front on the sensor and showing how it reacted to light and dark stripes.

I’ve knocked up a ‘bot simulator to show the club members the basic concepts behind line following


Other Roboteers were amended the Scratch code to alter the amount of steering left/right increased/decreased the value sent to the motors so that they could control it better manually.

We then had each team member run a race across the room and the boys narrowly won 3-2.

The next club is in 2 weeks and I WILL get the line followe sensorts fitted.  We plan on painting a black line down some white wallpaper and using it as a track.

Raspberry Pi vs/and/or Arduino Shrimps in Primary Education

Its early days yet in the brave new Raspberry Pi/ Arduino Shrimp world, but here’s where I’m at at this present time.

The current standard of doing IT/Control is to use a WinPC and a Data Harvest FlowOl input/output box (£99) – which is generally too expensive to use in a class of 30 working in pairs and the Go software isn’t like Scratch (and Scratch reigns supreme as THE primary programming language)

Raspberry Pi is cool and it can make a nice Scratch programmable Robot but doesn’t bring much else to the Primary Education party.

A full Raspberry Pi setup (Pi,Case,PSU,SD card,keyboard,mouse and HDMI monitor) costs £140 – which isn’t good value/money compared to a Win7 £200 netbook and far less portable and less easy to use in a class.

Plugging a Pi into an existing PC and VNCing into it does bring the cost of a using a Pi down to £50  and then if you add in a breadboard and some chips you could have an IT/Control setup for about £70.

And lastly, Scratch is a bit broken in places on the Raspberry Pi and not much visible effort is going into fixing it 😦

[edit]But you can build a complete Arduino Shrimp for £4  – add in another £10 of extra breadboards/wires/switches/leds and resistors and you have change from £15 🙂 (Will that do you Cefn 🙂  Just plug them into existing PCs and program that via S4A (Scratch 4 Arduino). – much more affordable.

The problem is that the S4A software is quite clunky to use and refers to Arduino pin numbering and isn’t suitable for non-geek educator use.

What’s needed (IMHO 🙂 ) is to create a Python hander (like what I’ve done for the Pi) and then just use normal Scratch (via the hidden handler) to send/receive msgs to and from a Shrimp.

So, my next project is to write this handler and see if it is viable.

[edit]Proof of concept http://www.youtube.com/watch?v=14kTmkIIXO4&feature=youtu.be

Comments/suggestions either here or via Twitter @cymplecy

Week 4 – ShrimpingIT Maker Club

Previously in the Maker Club

Good things – I ordered the PIR sensors, got plenty of LEDs, got 10 extra breadboards to give more space, tried and tested (and fixed) all 10 Shrimps 🙂
But…the PIR sensors didn’t arrive in time (China sourcing is cheap but slow 😦 ), decided to get club members to install S4A (Scratch 4 Arduino) on the laptops and upload the S4AFirmware to their shrimps – that took lot longer than it should/expected so we just ended up with 15 mins of actually programming our Shrimps but they all liked using a Scratch type interface and they switched their LEDs off and on and connected a switch to an input and saw that the S4A monitor changed value (they did query the words true/false).
As I only had one PIR sensor, we plugged that one in instead of the switch and we had a bit of fun in seeing if anyone could get near the Shrimp without setting it off.
Hopefully – next week, they will all be able to code up a simple alarm using S4A and maybe we can get around to the principle of an entry/exit delay