Josue Alejandro
Published © CERN-OHL

Dynamixel Interface Board V2

Dynamixel Interface board for Arduino or other microcontrollers using UART it's an adapter that integrates the 74LS241.

BeginnerProtip1 hour1,023
Dynamixel Interface Board V2

Things used in this project

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Schematic

Version V2

Code

Example code

C/C++
#include <DynamixelSerial.h>

#define SERVO_ID  1
int Temperature,Voltage,Position; 

void setup(){
Dynamixel.setSerial(&Serial1); // &Serial - Arduino UNO/NANO/328P, &Serial1, &Serial2, &Serial3
Dynamixel.begin(1000000,2);    // Inicialize the servo at 1 Mbps and Pin Control 2
Serial.begin(9600);            // Begin Serial Comunication
}

void loop(){
  Temperature = Dynamixel.readTemperature(SERVO_ID); // Request and Print the Temperature
  Voltage = Dynamixel.readVoltage(SERVO_ID);         // Request and Print the Voltage
  Position = Dynamixel.readPosition(SERVO_ID);       // Request and Print the Position 

  Dynamixel.move(1,random(200,800));
 
  Serial.print("Temperature: ");                  // Print the variables in the Serial Monitor
  Serial.print(Temperature); Serial.print(" celcius, ");
  Serial.print("Voltage: ");
  Serial.print(float(Voltage)/10);Serial.print(" volts, ");
  Serial.print("Position: ");
  Serial.println(Position);

  delay(1000);
}

Credits

Josue Alejandro

Josue Alejandro

15 projects • 12 followers
In my spare time I like to design electronics, I love product design from start to end. I love photography. I am a Hardware Fan.
Thanks to PCBWay.

Comments