Dependents: Serialservo_01 nhk_2018_undercarry_test08 nhk_2018_undercarry_test09 nhk_2018_undercarry_test10 ... more
Serialservo.h
- Committer:
- kenken0721
- Date:
- 2018-11-05
- Revision:
- 1:4caf52a715c2
- Parent:
- 0:2d468b5749f9
- Child:
- 2:da6abd6afe26
File content as of revision 1:4caf52a715c2:
#ifndef SERIALSERVO_H #define SERIALSERVO_H #include "mbed.h" class Serialservo{ public : Serialservo(PinName TX, PinName RX); void init(); void move(char id,int value);//0~270 void stretch(char id,int value);//0~127 void speed(char id,int value);//0~127 private : Serial ser; unsigned char servoval; long map(long x, long in_min, long in_max, long out_min, long out_max); }; #endif