Library for Sabertooth motor driver ported from the oficial Arduino library. Packetized Serial Mode
I ported the official arduino library for Sabertooth dual motor drivers. In the porting process I did not used const methods as the original library does, but the functionality stays the same. I also added some methods that I find useful. According to the documentation of the driver this code should be compatible with SyRen drivers.
ArduinoMath.h@1:013fa8604413, 2017-09-21 (annotated)
- Committer:
- Elefantul_umilit
- Date:
- Thu Sep 21 12:32:29 2017 +0300
- Revision:
- 1:013fa8604413
- Parent:
- 0:70797f033fe0
solved bug in setBaudRate. Now the baud is updated on the mcu as well
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Elefantul_umilit | 0:70797f033fe0 | 1 | #ifndef _ARDUINO_MATH_H_ |
Elefantul_umilit | 0:70797f033fe0 | 2 | #define _ARDUINO_MATH_H_ |
Elefantul_umilit | 0:70797f033fe0 | 3 | |
Elefantul_umilit | 0:70797f033fe0 | 4 | //those methods do exactly the same things as the corespondent Arduino methods do |
Elefantul_umilit | 0:70797f033fe0 | 5 | //see the Arduino documentation for more info. |
Elefantul_umilit | 0:70797f033fe0 | 6 | class ArduinoMath{ |
Elefantul_umilit | 0:70797f033fe0 | 7 | public: |
Elefantul_umilit | 0:70797f033fe0 | 8 | static int constrain(int, int, int); |
Elefantul_umilit | 0:70797f033fe0 | 9 | static int min(int, int); |
Elefantul_umilit | 0:70797f033fe0 | 10 | static int max(int, int); |
Elefantul_umilit | 0:70797f033fe0 | 11 | static int map(int, int, int, int, int); |
Elefantul_umilit | 0:70797f033fe0 | 12 | static int abs(int); |
Elefantul_umilit | 0:70797f033fe0 | 13 | private: |
Elefantul_umilit | 0:70797f033fe0 | 14 | ArduinoMath(){}; |
Elefantul_umilit | 0:70797f033fe0 | 15 | }; |
Elefantul_umilit | 0:70797f033fe0 | 16 | |
Elefantul_umilit | 0:70797f033fe0 | 17 | #endif |
Elefantul_umilit | 0:70797f033fe0 | 18 |