HerkuleXLib  1.1
Arduino library to drive HerkuleX DRS-0101 and DRS-0201
Public Member Functions | List of all members
HkxCommunication Class Reference

Class to manage the communication. More...

#include <HkxCommunication.h>

Public Member Functions

 HkxCommunication (hkxBaudrate baudrate, HardwareSerial &serialServos, HkxPrint &print)
 Constructor. More...

Detailed Description

Class to manage the communication.

This class manages the communications with the servos. It manages some possible communications problems and proposes simple functions to send requests to the servos.

Constructor & Destructor Documentation

HkxCommunication::HkxCommunication ( hkxBaudrate  baudrate,
HardwareSerial &  serialServos,
HkxPrint print 


The constructor of HkxCommunication.

[in]baudrate: Value of the baud rate to communicate with the servos. The same value shall be setup in the servos. See below the available values
| hkxBaudrate | HKX_57600 | HKX_115200 | HKX_200000 | HKX_250000 | HKX_400000 | HKX_500000 | HKX_666666 |
|  baud rate  |   57600   |   115200   |   200000   |   250000   |   400000   |   500000   |   666666   |
From experience, the baud rate 57600 does NOT work properly. Please avoid using it.
[in]serialServos: Serial port to use to communicate with the servos. It could be Serial, Serial1, Serial2 or Serial3 depending on the Arduino board and the wiring.
[in]print: Communication to print messages


HkxPrint print = HkxPrint(Serial, 9600);
HkxCommunication communication = HkxCommunication(HKX_115200, Serial1, print);

The documentation for this class was generated from the following files: