serial arduino controller
Dependents: serial_arduino 300_PS3Dribbler 300_PS3com Quadrifoglio_PS3COM
Diff: SerialArduino.cpp
- Revision:
- 1:36350a60662e
- Parent:
- 0:a591557e4771
- Child:
- 2:3b34130dfdd2
diff -r a591557e4771 -r 36350a60662e SerialArduino.cpp --- a/SerialArduino.cpp Tue Jun 07 04:10:16 2022 +0000 +++ b/SerialArduino.cpp Fri Jun 17 06:05:57 2022 +0000 @@ -3,8 +3,9 @@ SerialArduino::SerialArduino(PinName TX,PinName RX, int baud) : mini(TX,RX,baud) { - mini.attach(callback(this,&SerialArduino::serialLoop), SerialBase::RxIrq); +// mini.attach(callback(this,&SerialArduino::serialLoop), SerialBase::RxIrq); state=0; + thread.start(callback(this, &SerialArduino::serialLoop)); } void SerialArduino::serialLoop() @@ -31,6 +32,7 @@ } mini.write(CRLF,2); + ThisThread::sleep_for(1); }