Please help. any suggestion about message library

Hi, everyone. I’m a beginner

Pls help, can change massage all to lower string?

How can I do it?

Arduino recieve message from GSM Module. And i need to change its all to lower string. Now, I use message library.

#include <Messenger.h>
#include <String.h>
#include <stdio.h>

// Instantiate Messenger object with the message function and the default separator
// (the space character)
Messenger message = Messenger();

// Define messenger function
void messageCompleted() {
Message = Message.ToLower();
// This loop will echo each element of the message separately
while ( message.available() ) {
if ( message.checkString(“on”) ) {
digitalWrite(13,HIGH);
} else if ( message.checkString(“of”) ) {
digitalWrite(52,HIGH);
} else if ( message.checkString(“off”) ) {
digitalWrite(13,LOW);
} else if ( message.checkString(“ooff”) ) {
digitalWrite(52,LOW);
} else {
break; }
}

}

void setup() {
// Initiate Serial Communication
Serial.begin(115200);
message.attach(messageCompleted);

pinMode(13,OUTPUT);
pinMode(52,OUTPUT);
}

void loop() {

// The following line is the most effective way of
// feeding the serial data to Messenger
while ( Serial.available() ) message.process( Serial.read() );

}

Above codes won’t work.

Thanks advance.

You could OR each character with 0x20, I think, as long as you know it is a letter A-Z. A->a (0x41 -> 0x61) Z->z (0x5A -> 0x7a)

Or use "tolower".

Hi, Groove. Thanks for your suggestion. I will try.