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.

Dependents:   SDC21XX_Motor SDC21XX_Motor

Files at this revision

API Documentation at this revision

Comitter:
kkoichy
Date:
Thu Jun 16 12:30:29 2016 +0000
Parent:
5:95b0238d75a3
Commit message:
Added an example program in the .h file

Changed in this revision

Roboteq.h Show annotated file Show diff for this revision Revisions of this file
--- 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