Hey I am working on a small sms messaging project using arduino micro and fona 808 module.
I have a list of numbers stored as .csv and the goal is to send the message to everyone in the list. I am reading .csv via processing ide, no worries.
Phone numbers are 11,12 digit integers. I have managed to succeed in converting read from serial monitor integers into char. However, fona library function fona.sendSMS requires char* as an input for a phone number.
Hence, I struggle to convert integer (or char) into char* - char pointer.
I tried String, but it does not support 11-digit numbers and converts it to other base number.
This is what I have now - returns "invalid conversion from 'char' to 'char*' in sendSMS line.
byte index = 0;
char numin[32];
char numout;
void loop() {
if (Serial.available ()) {
numout = Serial.read();
numin[index] = numout;
index++;
numin[index] = '\0';
Serial.print (numout);
fona.sendSMS(numout, "hello how are you?");
}
I tried itoa() too, but no luck either, yet output was different, but still wrong.
Is there any way I can input 12 digit number at all?