Skip to content

tutRPi/6DOF-Robot-Arm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robot Arm Controls with Python

Raspberry Pi host using PCA9685 as an I2C 16 bit PWM driver to control the robot arm's Tower MG996R Servos In order to get this working, you may need to customize the limits / bounds for each servo so it will be tuned to your application

For terminal control

$ python 
>>> from Robot import Robot
>>> robot = Robot()

Now in that same python repl we can now access the robot and call module's methods to control such as:

>>> robot.hand.open()
>>> robot.hand.close()
>>> robot.servo.move_servo_to_percent(0,0)
>>> robot.servo.move_servo_to_percent(0,100)
>>> robot.servo.move_servo_to_percent(4, 0)
>>> robot.servo.move_servo_to_percent(4, 100)

Snipped from the example.py code in the root package

from Robot import Robot
from time import sleep

# invoke a new robot
robot = Robot()

# open the hand
robot.hand.open()

sleep(1)

# close the hand
robot.hand.close()

About

Controlling Robot arms with python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%