We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61eaaaa commit 27c050aCopy full SHA for 27c050a
libraries/WiFiS3/src/Modem.cpp
@@ -34,6 +34,20 @@ void ModemClass::begin(int badurate){
34
/* -------------------------------------------------------------------------- */
35
if(_serial != nullptr && !beginned) {
36
_serial->begin(badurate);
37
+
38
+ if(_serial_debug && _debug_level >= 2) {
39
+ _serial_debug->println("Baudrate autodetection started");
40
+ }
41
+ // auto baudrate detection algorithm
42
+ do {
43
+ _serial->write(0x55);
44
+ // delay(1);
45
+ } while(!_serial->available() || _serial->read() != 0x55); // TODO put timeout
46
47
48
+ _serial_debug->print("Baudrate autodetection terminated");
49
50
51
beginned = true;
52
string res = "";
53
_serial->flush();
0 commit comments