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.
Dependents: quad_spider_nhk2019_04
SerialServo.h
00001 #ifndef SERIALSERVO_H 00002 #define SERIALSERVO_H 00003 00004 #define ICS_POS_CMD 0x80 00005 #define ICS_PARA_WRITE_COMMND 0xC0 00006 #define SUB_ST_COMMND 0x01 00007 #define SUB_SP_COMMND 0x02 00008 00009 #include "mbed.h" 00010 00011 00012 class SerialServo{ 00013 public : 00014 SerialServo(PinName TX, PinName RX); 00015 void init(); 00016 void move(char id,int pos); 00017 void speed(char id,int spe);//0~127 00018 private : 00019 Serial ser; 00020 unsigned char tx_data[3]; 00021 void transmission(); 00022 }; 00023 00024 #endif
Generated on Fri Jul 22 2022 08:19:41 by
1.7.2