Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In an Arduino project I am not able to compile some code that uses the SoftwareSerial library. I get the following compilation errors. How do I correct the code?

C:\Program Files (x86)\Arduino\Arduino ERW 1.0.5\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':
C:\Program Files (x86)\Arduino\Arduino ERW 1.0.5\libraries\SoftwareSerial\SoftwareSerial.cpp:399: error: 'PCICR' was not declared in this scope
C:\Program Files (x86)\Arduino\Arduino ERW 1.0.5\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: 'PCMSK2' was not declared in this scope
C:\Program Files (x86)\Arduino\Arduino ERW 1.0.5\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: 'PCMSK0' was not declared in this scope
C:\Program Files (x86)\Arduino\Arduino ERW 1.0.5\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: 'PCMSK1' was not declared in this scope
C:\Program Files (x86)\Arduino\Arduino ERW 1.0.5\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::end()':
C:\Program Files (x86)\Arduino\Arduino ERW 1.0.5\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: 'PCMSK2' was not declared in this scope
C:\Program Files (x86)\Arduino\Arduino ERW 1.0.5\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: 'PCMSK0' was not declared in this scope
C:\Program Files (x86)\Arduino\Arduino ERW 1.0.5\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: 'PCMSK1' was not declared in this scope
share|improve this question
4  
Please show us your sketch. Without the code, it is hard to tell which include is missing where. – Posipiet Dec 29 '15 at 8:18
1  
What board are you compiling for? The errors seem to point to a missing .h file. – dda Dec 29 '15 at 9:45
    
Freeduino USB clone of arduino uno.#include <SoftwareSerial.h> – Mohamed Fazil Dec 29 '15 at 10:47
    
Are you using a current version of Softwareserial? github.com/arduino/Arduino/tree/master/hardware/arduino/avr/… ? Because the current version does not reference PCICR directly anymore. – Posipiet Dec 29 '15 at 14:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.