Connection problems / Problems with SoftwareSerial.h
Hi, I followed the instructions to install the RasPIArduino framework and I'm able to compile the sample code without problems, but I can't see the IP address of the Raspberry. Tried the installation several time, but it is still the same situation. The other problem is related to a code that includes the 'SoftwareSerial.h' library and this is the error message it get:
C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:41:27: fatal error: avr/interrupt.h: No such file or directory
#include <avr/interrupt.h>
^
compilation terminated.
Using library SoftwareSerial in folder: C:\Program Files (x86)\Arduino\libraries\SoftwareSerial (legacy) exit status 1 Error compiling for board RaspberryPI B+/2.
Below the sketch I'm trying to compile:
`/*********
Complete project details at http://randomnerdtutorials.com
*********/
#include <SoftwareSerial.h>
// Configure software serial port SoftwareSerial SIM900(7, 8);
void setup() { // Arduino communicates with SIM900 GSM shield at a baud rate of 19200 // Make sure that corresponds to the baud rate of your module SIM900.begin(19200); // Give time to your GSM shield log on to network delay(20000);
// Send the SMS sendSMS(); }
void loop() {
}
void sendSMS() { // AT command to set SIM900 to SMS mode SIM900.print("AT+CMGF=1\r"); delay(100);
// REPLACE THE X's WITH THE RECIPIENT'S MOBILE NUMBER // USE INTERNATIONAL FORMAT CODE FOR MOBILE NUMBERS SIM900.println("AT + CMGS = "+XXXXXXXXXXXX""); delay(100);
// REPLACE WITH YOUR OWN SMS MESSAGE CONTENT SIM900.println("Message example from Arduino Uno."); delay(100);
// End AT command with a ^Z, ASCII code 26 SIM900.println((char)26); delay(100); SIM900.println(); // Give module time to send SMS delay(5000); }`
Hope someone can help! Thanks in advance!!
Peter