-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
Currently working with the board MKR NB 1500.
After ugrading to MKRNB v1.6.0 i'm experiencing a problem with the message disposal functionality from example RecieveSMS.ino
I believe it's connected with the change in #100.
I acknowledge the bug presented - the first character is clipped if using peek in <v1.6.0, and was not according to the given documentation . Nevertheless, according to my experience this fix is breaking other functionality, as it now consequently reads the second character in the buffer, and not the first as I would expect.
Am I doing anything wrong?
Output;
Where 83 corresponds to 'S' in ascii.
Current code;
// If there are any SMSs available()
if (sms.available()) {
Serial.println("Message received from:");
// Get remote number
sms.remoteNumber(senderNumber, 20);
Serial.println(senderNumber);
Serial.print("Message starts with: ");
int peek = sms.peek();
Serial.println(peek);
// Read message bytes and print them
while ((c = sms.read()) != -1) {
Serial.print((char)c);
}
Serial.println("\nEND OF MESSAGE");
// Delete message from modem memory
sms.flush();
Serial.println("MESSAGE DELETED");
}
}
Metadata
Metadata
Assignees
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project