Robot Arm

Introduction
Public summary: 

Learn how to programme in scratch by controlling this robotic arm,

Programme a robot using scratch!
Useful information
Kit List: 

Robotic arm and USB interface
Laptop with installed software
something to pick up (can, lego)

Software
Scratch 2.0 Offline (Note version 3.0 lacks support for HTTP Extensions)
Python (2.7 defo but probs recent ones too) + pip
pyusb package (run pip install --pre pyusb)
libusb
http_server.py (python script)
maplinArm.json (scratch extension)

Explanation
Explanation: 

Set up
You'll need to check you have all the software on the laptop. If I remember there'll be a USB with it all on in the box however the internet has it available.
Firstly connect the arm and make sure it is switched on, then open a python terminal and run 'python http_server.py' which will execute the python script. A message saying the server is running should be displayed, leave it running all the time. Then you'll need to load the arm functions into scratch, press shift, then click file while holding shift. Go to "Install experimental HTTP Extension" then select 'maplinArm.json'. In scratch you should be able to access these under more blocks, then a 'MaplinArm' drop down. There should be a green dot next to 'MaplinArm' to indicate the communication is working.
[What you've done here is start up a HTTP server in python, this receives packets from scratch saying which instruction and then it runs some python which via some reverse engineer of the arm control protocol, a robotic arm library and USB wizardry to actually control the arm. Without the whole mechanism of HTTP this is a bit like an interpreter from Scratch into Python, if you wanted to talk about this and compilers feel free...]
see https://piamble.wordpress.com/controlling-the-maplin-robot-arm-with-scra...

Using it
It's like scratch but with some extra blocks that control the arm. The kids can probably figure it out simples even if you can't. Get them to pick things up, move them around and put them down again. You can talk about general robotics, what might you use this for? Problems? (I'd guess this could crush an empty can if you weren't careful) Maybe think about loops, automated processes in a factory. You could ask about improvements? Maybe fit a camera and then sort based on colour (you couldn't do this in scratch though!).

Risk Assessment
Date risk assesment last checked: 
Thu, 20/12/2018
Risk assesment checked by: 
Tdwebster
Date risk assesment double checked: 
Tue, 05/02/2019
Risk assesment double-checked by: 
Polly Hooton
Risk Assessment: 

Programming a robotic arm using scratch

Hazard Risk Likelihood Severity Overall Mitigation Likelihood Severity Overall
Electricity Various risks asociated with using mains electricity 2 3 6 See attached electrical RA 1 2 2
This experiment contains mains electrical parts, see separate risk assessment.
0
Images