@@ -15,18 +15,18 @@ Usage
1515=====
1616As a library:
1717
18- >>> import arm
18+ >>> import arm
1919
2020To initialise libusb and the arm
2121
22- >>> arm = usb_arm.Arm()
22+ >>> arm = usb_arm.Arm()
2323
2424This will tell you if all the dependencies work, and will throw an exception if it fails to find the arm and connect
2525 to it.
2626
2727Now lets test it by turning on the LED
2828
29- >>> arm.move(usb_arm.LedOn)
29+ >>> arm.move(usb_arm.LedOn)
3030
3131It will turn on for 1 second, and automatically turn off. The moveArm function automatically turns off after each
3232move. You can optionally specify another time, but since the Maplin arm doesn't have any sensors, beware that if
@@ -35,7 +35,7 @@ it reaches limits before the time finishes, then it won't stop.
3535Actual movement
3636---------------
3737
38- >>> arm.move(usb_arm.ElbowUp)
38+ >>> arm.move(usb_arm.ElbowUp)
3939
4040The elbow will move up.
4141The movements possible:
@@ -61,7 +61,7 @@ arm is currently capable of are represented above.
6161However, you may want to make more than one movement at the same time. You can do this by combining patterns with the
6262or operator:
6363
64- >>> arm.move(usb_arm.ElbowDown | usb_arm.BaseClockWise, 0.5)
64+ >>> arm.move(usb_arm.ElbowDown | usb_arm.BaseClockWise, 0.5)
6565
6666The arm should turn clockwise and bring the elbow up simultaneously for half a second.
6767
@@ -71,8 +71,8 @@ Gear Lash
7171The unmodified arm has a few flaws - it has fairly loose gear chains in the "servos" it uses for the movements.
7272To see what I mean try the following:
7373
74- >>> arm.move(usb_arm.ShoulderUp, 0.5)
75- >>> arm.move(usb_arm.ShoulderDown, 0.5)
74+ >>> arm.move(usb_arm.ShoulderUp, 0.5)
75+ >>> arm.move(usb_arm.ShoulderDown, 0.5)
7676
7777You will note the arm moves, but when it returns, it does not quite return to the same position - there is an error,
7878which you will need to account for as you use the arm and in programmed sequences.
@@ -87,11 +87,11 @@ know the position of the arm, and wont move it past its limits - which could cau
8787Sequences are created as arrays of commands. Each command is an array of the bitpattern, followed by the
8888optional time (defaulting to 1 second):
8989
90- >>> actions = [[ usb_arm.ElbowDown, 0.5] , [ usb_arm.CloseGrips, 0.5] , [ usb_arm.ElbowUp]]
90+ >>> actions = [[usb_arm.ElbowDown, 0.5], [usb_arm.CloseGrips, 0.5], [usb_arm.ElbowUp]]
9191
9292To issue the action list:
9393
94- >>> arm.doActions(actions)
94+ >>> arm.doActions(actions)
9595
9696Note you can ctrl-c stop the movements.
9797There are a couple of canned actions already in the module:
@@ -103,7 +103,9 @@ There are a couple of canned actions already in the module:
103103Troubleshooting
104104===============
105105
106- * Linux - permissions:
106+ Linux - permissions
107+ -------------------
108+
107109You will either need to run as root (not recommended) or modify your system to allow all users access to the device.
108110
109111 sudo nano /etc/udev/rules.d/42-usb-arm-permissions.rules
0 commit comments