CONTROL CODE FOR ROBOTIC ARMS VIA PC KEYBOARD

by mauriciodgsantos in Circuits > Robots

841 Views, 2 Favorites, 0 Comments

CONTROL CODE FOR ROBOTIC ARMS VIA PC KEYBOARD

TECLADO ARM.png
CÓDIGO CONTROLE BRAÇOS ROBÓTICOS VIA TECLADO PC

Move, record various positions and watch your robot perform the recorded movements.

Commands through the Arduino IDE's Serial Monitor, see the video above.

Control keys:

Q,A > Move the base (10 degrees and 1 degree in precision mode)

W,S > Move the main arm

L,D > Move the forearm

R,F > Move the grip

G > Record Mode

X, Space > Save a position

P > Play Mode (Perform movements in loop)

CAPS LOCK > If on, enable precision mode

+ , - > Change the movement speed

Warning! ENTER key must be pressed after each command

Supplies

LIGACOES ARDUINO UNO INGLES.png
  • 3 Degree of Freedom (DoF) Robotic Arm
  • Arduino Uno
  • Mini Protoboard
  • Power Supply ( 5v/6v - 4A)
  • Capacitor to reduce servo vibrations (Optional)
  • Computer with Arduino IDE installed
  • USB cable
  • Jumpers

Connections With Arduino

LIGACOES CONSOLE INGLES.png

Follow the diagram above for the connections of the robotic arm with the arduino.

IDE Library

IDE LIBRARY.png

Install the VarSpeedServo library in the Arduino IDE.

This library has commands that allow you to regulate the servo drive speed.

Download the library from the link below:

VarSpeedServo

Load the Code

With the external power supply off, upload the code to the Arduino. Then turn on the power supply and open the IDE's Serial Monitor.

Code here:

Start to Control

TECLADO INGLES.png

Now you can start controlling your robotic arm. The program starts in rec mode. Type the keys below to move the Arm and record the desired positions. It is necessary to press ENTER key after each command. After recording all positions, press P + ENTER to enter in play mode.

Q,A > Move the base (10 degrees and 1 degree in precision mode)

W,S > Move the main arm

L,D > Move the forearm

R,F > Move the grip

G > Record Mode

X, Space > Save a position

P > Play Mode (Perform movements in loop)

CAPS LOCK > If on, enable precision mode

+ , - > Change the movement speed

Warning! ENTER key must be pressed after each command


THANKS.