Skip to content

Instantly share code, notes, and snippets.

@joshbober
Created September 10, 2021 14:06
Show Gist options
  • Save joshbober/dfb2dbad47c03adbd89a0495d37f4624 to your computer and use it in GitHub Desktop.
Save joshbober/dfb2dbad47c03adbd89a0495d37f4624 to your computer and use it in GitHub Desktop.
Code change in Modem.cpp:
----------------------------------------------------
void ModemClass::poll()
{
while (_uart->available()) {
char c = _uart->read();
if (_debugPrint) {
_debugPrint->write(c);
Serial.print("["+(String)(_uart->available())+"]"); // Prints buffer size to SM after each char is read
}
_buffer += c;
----------------------------------------------------
Serial monitor output with this extra code:
10:05:19.844 -> [0]A[26]T[25]+[24]C[23]M[22]G[21]L[20]=[19]"[18]R[17]E[16]C[15] [14]U[13]N[12]R[11]E[10]A[9]D[8]"[7]
[6]
[5]
10:05:20.950 -> [4]O[3]K[2]
[1]
10:05:20.950 -> [0]A[63]T[62]+[61]C[60]M[59]G[58]L[57]=[56]"[55]R[54]E[53]C[52] [51]U[50]N[49]R[48]E[47]A[46]D[45]"[44]
[43]
[42]
10:05:22.053 -> [41]+[40]C[39]M[38]G[37]L[36]:[35] [34]1[33]5[32],[31]"[30]R[29]E[28]C[27] [26]U[25]N[24]R[23]E[22]A[21]D[20]"[19],[18]"[17]+[16]1[15]#[14]#[13]#[12]#[11]#[10]#[9]#[8]#[7]#[6]#[5]"[4],[3],[2]"[1]2[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment