Dependents: Serialservo_01 nhk_2018_undercarry_test08 nhk_2018_undercarry_test09 nhk_2018_undercarry_test10 ... more
Diff: Serialservo.h
- Revision:
- 0:2d468b5749f9
- Child:
- 1:4caf52a715c2
diff -r 000000000000 -r 2d468b5749f9 Serialservo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Serialservo.h Sun Mar 18 06:38:05 2018 +0000 @@ -0,0 +1,17 @@ +#ifndef SERIALSERVO_H +#define SERIALSERVO_H + +#include "mbed.h" + +class Serialservo{ +public : + Serialservo(PinName TX, PinName RX); + void init(char id); + void move(int value); +private : + Serial ser; + unsigned char servoval; + long map(long x, long in_min, long in_max, long out_min, long out_max); +}; + +#endif \ No newline at end of file