HRI board firmware  v2.1
Microcontroller firmware of the board used during the HRI labs.
Functions
Driver / External motorboard

Driver for an external motorboard. More...

Functions

void emot_Init (void)
 Initializes the motorboard driver. More...
 
void emot_SetTorque (float32_t torque)
 Set the motor torque. More...
 
float32_t emot_GetPosition (void)
 Gets the current motor shaft position. More...
 

Detailed Description

Driver for an external motorboard.

This driver controls an external motorboard, controlled through a serial link. This allows driving larger motors.

Call emot_Init() first in the initialization code. Then, call emot_SetTorque() to set the motor torque, and emot_GetPosition() to get the motor shaft position.

Function Documentation

◆ emot_GetPosition()

float32_t emot_GetPosition ( void  )

Gets the current motor shaft position.

Returns
the motor position given by the encoder [deg].

◆ emot_Init()

void emot_Init ( void  )

Initializes the motorboard driver.

◆ emot_SetTorque()

void emot_SetTorque ( float32_t  torque)

Set the motor torque.

Parameters
torquethe torque the motor should apply [N.m].