RMD-X Motor Library - Last Update V0.5 - On going...... Current available Function - read velocity - read all data - send velocity - send position

Revision:
0:433e4ec5de88
Child:
3:83fc10ac844c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RMD.h	Wed Nov 04 09:20:53 2020 +0000
@@ -0,0 +1,43 @@
+#ifndef RMD_H
+#define RMD_H
+
+#include "mbed.h"
+
+class RMD: public CAN{
+    
+    public:
+        RMD(PinName rx, PinName tx);
+
+        bool send_speed(int id, int speed);
+        
+        bool send_torque(int id, int torque);
+        
+        bool send_position(int id, int position);
+
+        void read_pid();
+
+        void int2byte(int num);
+        
+        void status();
+        
+         status_velocity();
+
+        char _data[4];
+
+        char _data_sent[8];
+
+        char _data_back[8];
+
+        //void send_speed(int n);
+
+        //unsigned char read_pid();
+
+    private:
+        unsigned char CANdata[4];   
+        unsigned char CANsent[8];
+        CANMessage msg;
+        int freq;
+        char id;
+};
+
+#endif
\ No newline at end of file