Open tcados opened 8 years ago
The same for me, i need to use library with other digital pins than TX/RX UART
The same for me, i have this problem too
In SIM800.hyou could comment the line number 14
// #define SIM_SERIAL Serial1
In SIM800.cpp you should insert the following lines at the start of the file:
#include <SoftwareSerial.h>
SoftwareSerial SIM_SERIAL(10, 11); // RX, TX
You have also to redefine the "available" function
In .cpp
bool CGPRS_SIM800::available()
{
return SIM_SERIAL.available() > 0;
}
In .h, delete the commands
bool available()
{
return SIM_SERIAL.available()>0;
}
and replace with:
bool
available();
Hi, Im trying to use the SIM800 library in accordance with your example.
Is there a reason why software serial won't work? I modified the test code as follows and it still doesn't work:
GPRSTest.ino: added:
include
SoftwareSerial SIMSer = SoftwareSerial(2, 3);
SIM800.h // change this to the serial UART which SIM800 is attached to
define SIM_SERIAL SIMSer
when I try to compile I get the following error:
Am I doing anything wrong in particular? or does the library just not support software serial?
Thanks! -T