I am trying to code a program that takes an integer value from another arduino via bluetooth (HC-05) and according to that value, sends a sms. I am just trying to make this code work on IDE, I havent set up the system yet. I chose Arduino Mega 2560 for debugging but Im getting these errors :
Multiple libraries were found for GSM.h and SoftwareSerial.h
Please mind that I am noob in Arduino so can you guys tell me how can I make this code work ? And also how should I connect hc 05 bluetooth module and gsm shield to Arduino Mega 2560 or Arduino Uno?
#include <GSM.h>
#include <SoftwareSerial.h>
#define PINNUMBER ""
SoftwareSerial BluetoothSerial(11, 10); // TX | RX
GSM gsm;
GSM_SMS sms;
char remoteNum[20] = "*******"; //
void SEND_SMS(char text[200])
{
sms.beginSMS(remoteNum);
sms.print(text);
sms.endSMS();
delay(5000); //
}
</code>
void setup()
{
Serial.begin(9600);
BluetoothSerial.begin(9600);
gsm.begin();
}
void loop(){
int message;
if (BluetoothSerial.available()>0){
message=BluetoothSerial.read();
}
if (message==1)
{
SEND_SMS("1 no swd detected");
}
else if (message==2)
{
SEND_SMS("2 no swd detected "); //
}
}