Thursday, 15 December 2016

Digital leaders at St Lukes Duston


Another example of the Robots in School - robot arm in use at St Luke's Primary, Duston, Northampton. For more details about the project go to Robot in School project sponsored by Santander UK


I am grateful to Santander UK for the funding; CBiS Education for their support and advice so far; last but not least the schools who have enthusiastically expressed an interest in taking part. All views are the authors.

Thursday, 17 November 2016

Duston goes to the moon





The Robots in School project is about providing, on a one year loan a set of robot arm kits in Schools (primary or secondary), and for them to play, come up with ideas around them and then share the ideas - http://robotschools.blogspot.co.uk/2016/06/start-of-project.html . Ten sets of robot arm kits were made available.


I am grateful to Santander UK for the funding; CBiS Education for their support and advice so far; last but not least the schools who have enthusiastically expressed an interest in taking part. All views are the authors.

Saturday, 1 October 2016

9 Schools involved with the project


The Robots in School project is about providing, on a one year loan a set of  robot arm kits in Schools (primary or secondary), and for them to play, come up with ideas around them and then share the ideas - http://robotschools.blogspot.co.uk/2016/06/start-of-project.html .  Ten sets of robot arm kits were made available.

An interactive map below shows the schools who are part of the project.



I am grateful to Santander UK for the funding; CBiS Education for their support and advice so far; last but not least the schools who have enthusiastically expressed an interest in taking part. All views are the authors.

Sunday, 25 September 2016

CBiS Education Cardboard2Code Module 1

CBiS Education Cardboard2Code Module 1:



Cardboard robot arm.

To find out more go to: http://www.cbis.education/cardboard2code_module1


'via Blog this'

All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Sunday, 4 September 2016

USB Robot arm control with Python and Raspberry Pi

I was asked recently if the USB robot arm could be programmed - I knew the answer was yes. The Arm came from the CBiS Education Robot Arm kit (http://www.cbis.education/Product-Details.aspx?prodid=2 ) which comes with a Raspberry Pi and SD Card with software to control the Arm. So the question has become - How do I program it in Python from scratch?

Well, the honest answer is I don't I use what others have done before. A good 
starting point is this site http://www.wikihow.com/Use-a-USB-Robotic-Arm-with-a-Raspberry-Pi-(Maplin), it gives most (pretty much all) of the answer, including where to get the pyusb library need; setting it up (be careful don't use the  zip file but the tar.gz version  - you might need to scroll down the screen to do this) and an example. A second source that was very useful was  http://notbrainsurgery.livejournal.com/38622.html?view=93150#t93150 which contains an explanation of the 'triples' (for example [32,0,0]) used to select which part of the arm moves and what it does (in the example [32,0,0] causes the Robot Elbow to move down).


The code below is largely based on the code in http://www.wikihow.com/Use-a-USB-Robotic-Arm-with-a-Raspberry-Pi-(Maplin) the only real changes are named procedures (such as ElbowUp) in place of the slightly less easy to understand lines such as  MoveArm(Duration,[4,0,0]) #wrist up . The only other changes was a procedure that changes what the light does (0 - light off; 1 - light on; 3 - pulses by a number of times).

import usb.core, usb.util, time
RoboArm = usb.core.find(idVendor=0x1267, idProduct=0x000)

if RoboArm is None:
    raise ValueError("Arm not found")

Duration=1
#Define a procedure to execute each movement
def MoveArm(Duration, ArmCmd):
    #Start the movement
    RoboArm.ctrl_transfer(0x40,6,0x100,0,ArmCmd,3)
    #Stop the movement after waiting a specified duration
    time.sleep(Duration)
    ArmCmd=[0,0,0]
    RoboArm.ctrl_transfer(0x40,6,0x100,0,ArmCmd,3)

def RotateBaseClockwise(Duration):
    MoveArm(Duration,[0,1,0]) #Rotate base clockwise

def RotateBaseAntiClockwise(Duration):
    MoveArm(Duration,[0,2,0]) #Rotate base clockwise

def ElbowUp(Duration):
    MoveArm(Duration,[16,0,0]) #Elbow up 0x10

def ElbowDown(Duration):
    MoveArm(Duration,[32,0,0]) #Elbow down 0x20

def WristUp(Duration):
    MoveArm(Duration,[4,0,0]) #wrist up 0x04

def WristDown(Duration):
    MoveArm(Duration,[8,0,0]) #wrist down 0x08

def CloseGripper(Duration):
    MoveArm(Duration,[1,0,0]) #close gripper 0x01

def OpenGripper(Duration):
    MoveArm(Duration,[2,0,0]) #open gripper 0x02

def ShoulderUp(Duration):
    MoveArm(Duration,[64,0,0]) #shoulder up 0x40

def ShoulderDown(Duration):
    MoveArm(Duration,[128,0,0]) #shoulder down 0x80

def GripLight(Action, Duration):
    if (Action==1):
        MoveArm(Duration,[0,0,1]) #light on
    if (Action==0):
        MoveArm(Duration,[0,0,0]) #light off
    if (Action==3):
        for x in range(Duration):
            MoveArm(1,[0,0,1]) #light on
            MoveArm(1,[0,0,0]) #light off

WristUp(0.5)
OpenGripper(0.5)
RotateBaseClockwise(2)
RotateBaseAntiClockwise(2)
ElbowUp(1)
ElbowDown(1)
WristDown(0.5)
CloseGripper(0.5)
ShoulderUp(3)
ShoulderDown(1)
GripLight(3,3)


See it action in the video below.


 





All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.


I am grateful to Santander UK for the funding; CBiS Education for their support and advice so far; last but not least the schools who have enthusiastically expressed an interest in taking part. All views are the authors.

Tuesday, 16 August 2016

Robot Arm visits the Eagle (Lab) - update

On 13th August a robot arm kit and myself went to a Pi Jam in Birmingham (https://www.eventbrite.co.uk/e/eagle-labs-raspberry-jam-tickets-26066064300#) at the Eagle Lab in Birmingham. In the background of one of the pictures below you can see a glimpse of the arm, though three people are using or discussing it the time.







One of the questions that came up, was how to use the arm without proprietary software. To answer that I have had a go using Python to control the arm see the following for more details http://robotsandphysicalcomputing.blogspot.co.uk/2016/08/usb-robot-arm-control-with-python-and.html.


I am grateful to Santander UK for the funding; CBiS Education for their support and advice so far; last but not least the schools who have enthusiastically expressed an interest in taking part. All views are the authors.

Thursday, 28 July 2016

Month 2 - Yr6 activity at Wollaston School


Some great work carried out by @scipiguy at Wollaston School










I am grateful to Santander UK for the funding; CBiS Education for their support and advice so far; last but not least the schools who have enthusiastically expressed an interest in taking part. All views are the authors.

Saturday, 9 July 2016

Week 5 - Tidy solution




OmniVESA details can be found at: https://shop.pimoroni.com/products/omnivesa





I am grateful to Santander UK for the funding; CBiS Education for their support and advice so far; last but not least the schools who have enthusiastically expressed an interest in taking part. All views are the authors.

Friday, 1 July 2016

Week 4 in tweets and map





The map below shows the schools who are part of the project.





I am grateful to Santander UK for the funding; CBiS Education for their support and advice so far; last but not least the schools who have enthusiastically expressed an interest in taking part. All views are the authors.

Friday, 17 June 2016

Two week update

Two weeks into the start of the Robot Arm in Schools project and the number of kits available is dropping steadily now.

Six Northamptonshire Primary schools and two Secondary school now have the kits in most parts of the county. I am looking forward to seeing what happens with the kits, from the discussions with the schools, it is going to be interesting.




I am grateful to Santander UK for the funding; CBiS Education for their support and advice so far; last but not least the schools who have enthusiastically who are taking part. All views are the author's and not an organisation the author is associated with.