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.
control.h
00001 00002 #ifndef CONTROL_H_ 00003 #define CONTROL_H_ 00004 #define FRAME_HEADER 0x55 //帧头 00005 #define CMD_SERVO_MOVE 0x03 //舵机du移动指令 00006 #define CMD_ACTION_GROUP_RUN 0x06 //运行动作组指令 00007 #define CMD_ACTION_GROUP_STOP 0x07 //停止ti动作组指令 00008 #define CMD_ACTION_GROUP_SPEED 0x0B //设置动作组运行速度 00009 #define CMD_GET_BATTERY_VOLTAGE 0x0F //获取电池电压指令 00010 #include "mbed.h" 00011 #include "data_pc.h" 00012 extern uint8_t LobotRxBuf[16]; 00013 extern uint16_t batteryVolt; 00014 extern void receiveHandle(void); 00015 typedef struct _lobot_servo_ { //舵机ID,舵机目标位置 00016 uint8_t ID; 00017 uint16_t Position; 00018 } LobotServo; 00019 00020 00021 void moveServo(uint8_t servoID, uint16_t Position, uint16_t Time); 00022 void getBatteryVoltage(void); 00023 void BaterryOut(void); 00024 00025 00026 #endif
Generated on Sun Jul 17 2022 23:34:05 by
1.7.2