Version 5 updated to 5.1.26

New features

Support for Dr Simon Monk Raspirobotboard 2

Support for 4Tronix Pizazz Robot Kit

Input handling now responds to short lived events – very useful for Line Following Robots and Burglar Alarms etc

Camera Support courtesy of Matt Venn

Broadcast photo

This will take a photo and stick it in /home/pi/photos using Raspberry Pi camera

Basic Minecraft support

Broadcast MinecraftStart to connect to running Minecraft program

set MineX setMineY and setMineZ followed my MinecraftMove should move you to a the co-ordinates defined

or you can do Broadcast MineCraftCamMove to move the camera to those co-ords instead

Thats all it does so far

Other changes,

ADAFruit and 4Tronix I2C PWM and analogue input boards bow supported at a ll times wit ha ll add-ons

ScratchGPIO 5.1.15

OLD VERSION RESTORED AS THIS ONE DIDN’T WORK!!!!!

This version made it to the stable version tonight.

New features

broadcast photo

This will take a photo and stick it in /home/pi/photos using Raspberry Pi camera

broadcast MinecraftStart to connect to running Minecraft program

set MineX setMineY and setMineZ followed my MinecraftMove should move you to a the co-ordinates defined

or you can do Broadcast MineCraftCamMove to move the camera to thos co-ords instead

Thats all it does so far

Other changes,

ADAFruit and 4Tronix I2C PWM and analogue input boards bow supported at a ll times wit ha ll add-ons

 

Uniqueness of Rasperry Pi Serial Numbers

My SID project needs the user to type in the last 4 digits of a PI’s serial num in order to connect remotely.

I chose 4 as I thought (intuitively) that it was enough digits to almost certainly be unique in a class of 15 Pi.

Of course,  if it takes one year 7 child x attempts in t time to get it right then imagine the number of attempts a class of 30 children working in “teams”  of two takes to do this.  then make it 2 digits – then 3 – then 4.

…….. so 30 mins later, all pupils have connected their laptops to their Pi 🙂

OK – lets try and me more scientific and find the probability of 1/2/3 or 4 digits letting us uniquely identify a Pi.

Turns outs to be one of those great maths problems called the “birthday problem” and that the probability of any 2 Pi out of 15 having same last digits of serial number is (in %) where r = num of Pi and d = number of hex digits is given by

a = (16^d)!
b = (16^d)^r)
c = ((16^d)-r)!

P(%) = 100*(1 – a/(b * c)

Substituting r = 15 and d =2 gives 34%

Substituting r = 15 and d =3 gives 2.5%

Substituting r = 15 and d = 4 gives 0.2%

So maybe we could get away with 3 digits but with say 30 Pi the numbers change to

Substituting r = 30 and d = 3 gives 10%

Substituting r = 30 and d = 4 gives 0.7%

So in a class of 30 you’d have to use 4 digits and so for compatibility for rich schools  – I’ve stuck with 4 digits 🙂

Just for an exercise, I wondered if I converted the serial num into Base 30 (using 0,1,2….x,y,z) for digits I get this

Substituting r =15 and d =2 gives 11%

Substituting r =15 and d =3 gives 0.4%

and even for a class of 30

Substituting r =30 and d =2 gives 38%

Substituting r =30 and d =3 gives 1.6%

So I’d say we could get away with three Base 30 digits.

But since its a lot of trouble to convetr from Base 16 to Base 30, I’m going to stick with 4 hex digits and stick them on the side of each Pi 🙂