Hello
I have a skecth that was build on a arduino IDE 22 and I was using the Serial function as normal.Now I want to use the Newsoftserial library to change the pins (rx tx) and have more devices on serial comunication,but now the program wont work just changing it to the new library Newsoftserial.
here is some part of the code
void setup()
{
Serial.begin(9600);
Serial.println("Start Reading Modem");
modem.begin(9600);
pic.begin(2400);
pinMode(13, OUTPUT);
pinMode(22, INPUT);
digitalWrite(13, LOW);
modem.write("AT"); //Set Modem to Text Mode
delay(30);
modem.write(0x0d,BYTE); //Give an Enter @ final of the AT Command
delay(30);
modem.write("AT+CMGF=1");
modem.flush();//Clear the Serial Buffer to remove unexpected data
when I try to build it give an error:
sms_07_03.cpp: In function 'void setup()':
sms_07_03:27: error: invalid conversion from 'const char*' to 'uint8_t'
sms_07_03:27: error: initializing argument 1 of 'virtual void NewSoftSerial::write(uint8_t)'
sms_07_03:29: error: no matching function for call to 'NewSoftSerial::write(int, int)'
C:\Users\Hugo\Documents\arduino-0022\libraries\NewSoftSerial/NewSoftSerial.h:99: note: candidates are: virtual void NewSoftSerial::write(uint8_t)
sms_07_03:31: error: invalid conversion from 'const char*' to 'uint8_t'
sms_07_03:31: error: initializing argument 1 of 'virtual void NewSoftSerial::write(uint8_t)'
sms_07_03.cpp: In function 'void extract_SMS_Data()':
sms_07_03:86: error: invalid conversion from 'const char*' to 'uint8_t'
sms_07_03:86: error: initializing argument 1 of 'virtual void NewSoftSerial::write(uint8_t)'
sms_07_03:90: error: no matching function for call to 'NewSoftSerial::write(int, int)'
C:\Users\Hugo\Documents\arduino-0022\libraries\NewSoftSerial/NewSoftSerial.h:99: note: candidates are: virtual void NewSoftSerial::write(uint8_t)
sms_07_03.cpp: In function 'void clear_Received_SMS()':
sms_07_03:131: error: invalid conversion from 'const char*' to 'uint8_t'
sms_07_03:131: error: initializing argument 1 of 'virtual void NewSoftSerial::write(uint8_t)'
sms_07_03:134: error: no matching function for call to 'NewSoftSerial::write(int, int)'
C:\Users\Hugo\Documents\arduino-0022\libraries\NewSoftSerial/NewSoftSerial.h:99: note: candidates are: virtual void NewSoftSerial::write(uint8_t)
sms_07_03.cpp: In function 'void send_SMS(String, String)':
sms_07_03:154: error: invalid conversion from 'const char*' to 'uint8_t'
sms_07_03:154: error: initializing argument 1 of 'virtual void NewSoftSerial::write(uint8_t)'
sms_07_03:156: error: invalid conversion from 'const char*' to 'uint8_t'
sms_07_03:156: error: initializing argument 1 of 'virtual void NewSoftSerial::write(uint8_t)'
sms_07_03:157: error: no matching function for call to 'NewSoftSerial::write(String&)'
C:\Users\Hugo\Documents\arduino-0022\libraries\NewSoftSerial/NewSoftSerial.h:99: note: candidates are: virtual void NewSoftSerial::write(uint8_t)
sms_07_03:158: error: no matching function for call to 'NewSoftSerial::write()'
C:\Users\Hugo\Documents\arduino-0022\libraries\NewSoftSerial/NewSoftSerial.h:99: note: candidates are: virtual void NewSoftSerial::write(uint8_t)
sms_07_03:160: error: no matching function for call to 'NewSoftSerial::write(String&)'
C:\Users\Hugo\Documents\arduino-0022\libraries\NewSoftSerial/NewSoftSerial.h:99: note: candidates are: virtual void NewSoftSerial::write(uint8_t)
sms_07_03:161: error: no matching function for call to 'NewSoftSerial::write(int, int)'
C:\Users\Hugo\Documents\arduino-0022\libraries\NewSoftSerial/NewSoftSerial.h:99: note: candidates are: virtual void NewSoftSerial::write(uint8_t)
I presume it is because the write function is expecting a int and I'm seending a char?