Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
RMD.h
- Committer:
- sornpraram
- Date:
- 2020-12-19
- Revision:
- 20:0756a01f7415
- Parent:
- 13:09e4446b41cc
File content as of revision 20:0756a01f7415:
#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, int speed); void read_pid(); void int2byte(int num); void int2byte2(int pos, int speed); void status(); int status_velocity(); void status_position(); char _data[4]; char _data_sent[8]; char _data_back[8]; //void send_speed(int n); //unsigned char read_pid(); private: unsigned char CANdata[6]; unsigned char CANsent[8]; CANMessage msg; int freq; char id; }; #endif