Pages: [1]   Go Down
Author Topic: Arduino Robot Control - Software Serial Library Not Compiling  (Read 19 times)
1 Member and 1 Guest are viewing this topic.
0
Online Online
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Has anyone any ideas about how to resolve being able to use SoftwareSerial with the Arduino Rbot Control

I'd quite like to add an HC-06/5 and I thought best to use the SoftwareSerial library

However I get this when i try to compile:

C:\dev\arduino\arduino-1.5.5-r2\hardware\arduino\avr\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':
C:\dev\arduino\arduino-1.5.5-r2\hardware\arduino\avr\libraries\SoftwareSerial\SoftwareSerial.cpp:399: error: 'digitalPinToPCICR' was not declared in this scope
C:\dev\arduino\arduino-1.5.5-r2\hardware\arduino\avr\libraries\SoftwareSerial\SoftwareSerial.cpp:401: error: 'digitalPinToPCICRbit' was not declared in this scope
C:\dev\arduino\arduino-1.5.5-r2\hardware\arduino\avr\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: 'digitalPinToPCMSK' was not declared in this scope
C:\dev\arduino\arduino-1.5.5-r2\hardware\arduino\avr\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: 'digitalPinToPCMSKbit' was not declared in this scope
C:\dev\arduino\arduino-1.5.5-r2\hardware\arduino\avr\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::end()':
C:\dev\arduino\arduino-1.5.5-r2\hardware\arduino\avr\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: 'digitalPinToPCMSK' was not declared in this scope
C:\dev\arduino\arduino-1.5.5-r2\hardware\arduino\avr\libraries\SoftwareSerial\SoftwareSerial.cpp:418: error: 'digitalPinToPCMSKbit' was not declared in this scope

I had a look at how to get access to the RX/TX pins but they seem to be in use by the controller.


Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 644
Posts: 50487
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Has anyone any ideas about how to resolve being able to use SoftwareSerial with the Arduino Rbot Control
Sure. Use the right version of the IDE. The 1.5+ versions are for Arduinos with SAM chips. The 1.0+ versions are for Arduinos with ARM chips.

SoftwareSerial is not supported on SAM chips.
Logged

0
Online Online
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


The error applies on both versions of Arduino 1.05 and 1.5.x.  I had a look in pins_arduino.h and the macros that are defined in the other board definitions and they are not in pins_arduino.h for the control board.

This is the one in the Leonardo for example:

#define digitalPinToPCICR(p)    ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
#define digitalPinToPCICRbit(p) 0
#define digitalPinToPCMSK(p)    ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))

#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
Logged

Pages: [1]   Go Up
Jump to: