background image

SMARS - the Screwless  Modular Assembleable Robotic System.  

To download the files visit https://www.thingiverse.com/thing:2755973

7

Quad Robot Software Configuration

Once you’ve downloaded the python code you can 
begin checking the configuration of the servos:

Python environment setup

The PCA9685 servo driver library is provided by 
Adafruit and needs to be installed before setup 
and using the SMARS Quad robot.

To download the adafruit servo library first 
logon to the Raspberry Pi and then type:

sudo apt-get install git build-essential python-dev
cd ~
git clone https://github.com/adafruit/
Adafruit_Python_PCA9685.git
cd Adafruit_Python_PCA9685
sudo python setup.py install

Python is now setup for the servo 
driver.

python limb_setup.py

Use the menu to select the channel you 
want to configure. There are 16 
channels, one for each servo.

The channels start at 0, and end at 15.

Menu
----

1) select channel
2) select angle
0) quit

current channel is: 0
current angle is: 0
enter number 

Type ‘1’ to change the current channel.

Select Channel
--------------

currently selected channel is: 0
type channel number:, or q to return to the main menu

Next, type 0 to configure channel 0

Type ‘1’ to change the current channel.

Select Channel
--------------

currently selected channel is: 0
type channel number:, or q to return to the main menu

Next, type ‘0’ to configure channel 0

Then type ‘q’ to return to the main 
menu.

Menu
----

1) select channel
2) select angle
0) quit

current channel is: 0
current angle is: 0
enter number 

Type ‘2’ to set the angle for the 
current channel.

Select Angle
------------

current angle is: 0
Type angle to set servo to, or press q to exit90
90
Angle is: 90
Angle =  90
Angle as a percentage =  50.0
pulse =  375
map Max =  450
current angle: 90
Type angle to set servo to, or press q to exit

Type ’90’ to set the angle to 90 
Degrees.

Then type ‘q’ to return to the main 
menu.

Repeat this until you have set each 
limb correctly.

Finally type ‘0’ to quit the limb setup 
programme.

QUAD ROBOT
SOFTWARE SETUP

S

M

A S

R

Summary of Contents for QUAD ROBOT

Page 1: ...2 3 GND OE SCL SDA VCC V I2C Address Open 0 Closed 1 GND OE SCL SDA VCC V 4 5 6 7 8 9 10 11 12 13 14 15 A5 A4 A3 A2 A1 A0 RW Servo 4 Back Left Servo 3 Back Left Foot Base Servo 2 Top Left Servo 5 Back...

Page 2: ...ge of the servo holder SG90 Servo Servo Holder Servo Holder M 3 Fit the servo into the servo holder x8 4 Fit the servo holders into the frame The following instructions show how to assemble the SMARS...

Page 3: ...the servo arms 6 Mount the servo holder in the servo arm 7 Check the servo rotation x4 8 Attach the other servo holders to the frame SG90 Servo Insert the servo horn onto the servo and screw in secure...

Page 4: ...r 11 Check the servo rotation 12 Download the python code x4 x4 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 90 180 170 160 150 140 1 3 0 1 2 0 1 1 0 1 0 0 Feet need a rotation of between 50 to 150 degrees From...

Page 5: ...r board using I2C which only requires 2 wires System Clock SCL and System Data SDA These are marked on servo driver board and on pins 3 7 on the Raspberry Pi Zero 0 1 GND V POWER 16x12 bit PWM PCA9685...

Page 6: ...y needs between 0 and 90 degrees of rotation The servos are oriented differently for each leg so the degrees of rotation for each needs to be understood and set correctly in the code Range of Motion F...

Page 7: ...at 15 Menu 1 select channel 2 select angle 0 quit current channel is 0 current angle is 0 enter number Type 1 to change the current channel Select Channel currently selected channel is 0 type channel...

Page 8: ...s www thingiverse com thing 2755973 8 About this Guide This guide was written by Kevin McAleer and is provided freely to the SMARS community Social Media If you haven t already please join the faceboo...

Reviews: