Command library for the Roboteq SDC21XX serie of DC Motor drivers, using CANopen Interface. This library replicates the CANopen commands detailled in the User's Manual for the SDC21XX Serie, Section 14 CANopen Interface. Please refer to this document for more details about the use of any of the commands.
Fork of Roboteq_SDC_serie by
Diff: Roboteq.h
- Revision:
- 6:bd10b47f59d2
- Parent:
- 5:95b0238d75a3
- Child:
- 7:9a17b688dd59
--- a/Roboteq.h Wed Jun 01 15:02:17 2016 +0000 +++ b/Roboteq.h Thu Jun 16 12:30:29 2016 +0000 @@ -1,3 +1,50 @@ +/* Example programm for Nucleo F446RE : + Two motors are connected to 2 SDC21XX controllers, both on channel 1. + When pressing the user button, 2 CANopen frames are sent, setting the motors to go to the position referred to as +/- 1000 + ************************************************************ +#include "mbed.h" +#include "Roboteq.h" +#include "CAN.h" + +InterruptIn Button(PC_13); +Serial pc(USBTX,USBRX); +CAN Can(PA_11, PA_12); +Roboteq Robot_Moteur1(4, &Can); +Roboteq Robot_Moteur2(5, &Can); +int i = 0, j = 1; + +void send(void) +{ + pc.printf("1"); + Robot_Moteur1.SetPosition(j * 1000, 1); + Robot_Moteur2.SetPosition(-j * 1000, 1); + j = -j; + +} + +int main() { + Can.frequency(250000); + pc.baud(115200); + pc.printf("\n\rdebut prog"); + + Button.fall(&send); + + + + while(1) { + + + } +} +*/ + + + + + + + + #ifndef ROBOTEQ_H #define ROBOTEQ_H