Ayuda por favor.
Con este código
</#include <DFRobot_sim808.h>
//#include <SoftwareSerial.h> // si lo reclama descomenta.
#define MESSAGE_LENGTH 160
char message[MESSAGE_LENGTH];
int messageIndex = 0;
char phone[16];
char datetime[24];
DFRobot_SIM808 sim808(&Serial3, 1); // El número final es 1 si hardwareserial o 0 para softwareserial
void setup() {
//mySerial.begin(9600);
Serial3.begin(9600);
Serial.begin(9600);
//******** Initialize sim808 module *************
while(!sim808.init()) {
Serial.print("Sim808 init error\r\n");
delay(1000);
}
delay(3000);
Serial.println("Init Success, please send SMS message to me!");
}
void loop() {
//*********** Detecting unread SMS ************************
messageIndex = sim808.isSMSunread();
Serial.print("messageIndex: ");
Serial.println(messageIndex);
//*********** At least, there is one UNREAD SMS ***********
if (messageIndex > 0) {
sim808.readSMS(messageIndex, message, MESSAGE_LENGTH, phone, datetime);
//***********In order not to full SIM Memory, is better to delete it**********
sim808.deleteSMS(messageIndex);
Serial.print("From number: ");
Serial.println(phone);
Serial.print("Datetime: ");
Serial.println(datetime);
Serial.print("Recieved Message: ");
Serial.println(message);
}
}
/>
Me da el siguiente error.
/Users/jesus/Documents/Arduino/Modem808/Modem808.ino:11:34: error: invalid conversion from 'USARTClass*' to 'uint8_t {aka unsigned char}' [-fpermissive]
DFRobot_SIM808 sim808(&Serial3, 1); // El número final es 1 si hardwareserial o 0 para softwareserial
^
In file included from /Users/jesus/Documents/Arduino/Modem808/Modem808.ino:1:0:
/Users/jesus/Documents/Arduino/libraries/DFRobot_SIM808/DFRobot_sim808.h:53:5: error: initializing argument 1 of 'DFRobot_SIM808::DFRobot_SIM808(uint8_t, uint8_t, uint32_t)' [-fpermissive]
DFRobot_SIM808(uint8_t tx, uint8_t rx, uint32_t baudRate = 9600 );
^
exit status 1
Compilation error: invalid conversion from 'USARTClass*' to 'uint8_t {aka unsigned char}' [-fpermissive]