Hi
I'm writing a library for SIM900. I've got a function to read a message, but somehow it can't do a simple 'printf' when using additional arguments:
Snippet that doesn't work
char* SIM900::readMessage(char messagenumber)
{
_serial.printf("AT+CMGR=%c",messagenumber);
return _atcmdc("\r", "OK\r\n", 2000);
}
the _adcmdc function just sends the "\r" to my serialport, this function work, but I can't pass that darn variable for my function.
Any ideas?
I have tried a lot of different options now, trying to pass chars, char, bytes, everything. From my main I do this:
main.cpp for SIM900
if(strstr(GSM.readMessage('1'), "START1")){
LED2 = 1;
}
Sniffing the serial port says that the char is not transferred. This is weird or is it me?
Thanks in advance. Lerche
Hi
I'm writing a library for SIM900. I've got a function to read a message, but somehow it can't do a simple 'printf' when using additional arguments:
Snippet that doesn't work
the _adcmdc function just sends the "\r" to my serialport, this function work, but I can't pass that darn variable for my function.
Any ideas?
I have tried a lot of different options now, trying to pass chars, char, bytes, everything. From my main I do this:
main.cpp for SIM900
Sniffing the serial port says that the char is not transferred. This is weird or is it me?
Thanks in advance. Lerche