paling baru
Dependencies: DigitDisplay Motor PID Ping mbed millis
Fork of MainProgram_BaseBaru_fix_omni_11April by
Diff: JoystickPS3.h
- Revision:
- 12:e07c59c28c29
- Parent:
- 3:1287fccc11be
- Child:
- 13:8ab42383a2ca
--- a/JoystickPS3.h Tue Nov 29 15:26:09 2016 +0000 +++ b/JoystickPS3.h Sat Dec 03 05:43:10 2016 +0000 @@ -1,17 +1,17 @@ #ifndef MBED_H #include "mbed.h" #endif - + #ifndef JoystickPS3__serialDEFAULT_BAUD #define JoystickPS3__serialDEFAULT_BAUD 115200 #endif - + Serial debug(USBTX,USBRX); - - + + namespace JoystickPS3 { - + class joysticknucleo { public: joysticknucleo(PinName tx, PinName rx) : _serial(tx, rx) @@ -31,7 +31,7 @@ _serial.baud(JoystickPS3__serialDEFAULT_BAUD); debug.baud(9600); } - + /*********************************************************************************************/ /** **/ /** FUNGSI PEMBACAAN DATA **/ @@ -170,8 +170,8 @@ // debug.printf("%2x %2x %2x %2x %3d %3d %3d %3d %3d %3d\n\r",button, RL, button_click, RL_click, R2, L2, RX, RY, LX, LY); } } - - + + int readable(){ return _serial.readable(); @@ -192,7 +192,7 @@ virtual int _getc(){return _serial.getc();} Serial _serial; }; - + }; - + using namespace JoystickPS3; \ No newline at end of file