Quadruped()

Function Definition: Quadruped(Front Right Hip = 4, Front Left Hip = 1, Front Right Leg = 8, Front Left Leg = 5, Back Right Hip = 3, Back Left Hip = 2, Back Right Leg = 7, Back Left Leg = 6)

Parameters

NameTypeDescriptionExpected ValuesDefault Value
Front Right HipintThe servo pin number to which the Front Right Hip is connected on the Expansion board.1-84
Front Left HipintThe servo pin number to which the Front Left Hip is connected on the Expansion board.1-81
Front Right LegintThe servo pin number to which the Front Right Leg is connected on the Expansion board.1-88
Front Left LegintThe servo pin number to which the Front Left Leg is connected on the Expansion board.1-85
Back Right HipintThe servo pin number to which the Back Right Hip is connected on the Expansion board.1-83
Back Left HipintThe servo pin number to which the Back Left Hip is connected on the Expansion board.1-82
Back Right LegintThe servo pin number to which the Back Right Leg is connected on the Expansion board.1-87
Back Left LegintThe servo pin number to which the Back Left Leg is connected on the Expansion board.1-86

Description

The function initializes the quadruped robot object in Python and maps the 8 servos to the specified pins. As the default, the servo motors should be connected to the following pins:

  1. Front Right Hip – Servo Pin 4
  2. Front Left Hip – Servo Pin 1
  3. Front Right Leg – Servo Pin 8
  4. Front Left Leg – Servo Pin 5
  5. Back Right Hip – Servo Pin 3
  6. Back Left Hip – Servo Pin 2
  7. Back Right Leg  – Servo Pin 7
  8. Back Left Leg – Servo Pin 6
Alert: If the connection is not done as specified, then you have to change the pin for the code in this block.

Example

There are no examples documented for this article.
Table of Contents