Comments (5)
SoftwareSerial uses Pin Change Interrupts, and as a result it is indeed in
direct conflict with this library.
The only way to make them compatible would be to do something like this:
* Figure out which port(s) you want to use for Software Serial.
* Figure out which port(s) you want to use for Pin Change Interrupts.
Set up the #defines in Pin Change Interrupts so as to shut off the Software
Serial ports: #define NO_PORTx_PINCHANGES
Copy the SoftwareSerial library to your personal libraries folder; call it
mySoftwareSerial or something like this. Do a global namechange from
SoftwareSerial to mySoftwareSerial.
Delete the appropriate ISR in mySoftwareSerial. For example, if you knew you
weren't going to use PORTD for SoftwareSerial, you would delete:
#if defined(PCINT2_vect)
ISR(PCINT2_vect)
{
SoftwareSerial::handle_interrupt();
}
#endif
and so on.
So this is a limitation, not a bug.
Original comment by [email protected]
on 12 Mar 2012 at 12:24
- Changed state: WontFix
from arduino-pinchangeint.
[deleted comment]
from arduino-pinchangeint.
[deleted comment]
from arduino-pinchangeint.
I have tried to implement this by adding ...
1)#define NO_PORTD_PINCHANGES (in my sketch)
2)and deleting:
#if defined(PCINT2_vect)
ISR(PCINT2_vect)
{
SoftwareSerial::handle_interrupt();
}
#endif
I did not decide to rename the SoftwareSerial library contents as i do not know
how to do a global namechange. I need two serial ports and 5 external
interrupts, can you please advise me on what to do?
Original comment by [email protected]
on 18 Mar 2014 at 12:42
from arduino-pinchangeint.
Yes, you have to change the name of the .h file, the .cpp file, put them in
your directory alongside your sketch, and #include it under the new name. Then
it should work.
Original comment by [email protected]
on 18 Mar 2014 at 12:11
from arduino-pinchangeint.
Related Issues (20)
- Recommended strategy for using of PinChangeInt to read RC receiver pulses HOT 26
- Issues testing interrupts on PORT D HOT 15
- Issue with pins 14 through 19 HOT 5
- The wiki is down HOT 1
- Modify code comments AND documentation regarding the location of NO_PORTX_PINCHANGES HOT 1
- Support for PORTA pin changes (>28-pin ATmegas) HOT 6
- Need # define for MAx # of interruptable pins HOT 4
- Should PCintPort::curr be volatile? HOT 3
- Issue with using pinchangeint HOT 5
- PCintPort not declared.... HOT 3
- Seems not to distinguish between RISING/FALLING HOT 6
- [Question] HOT 1
- Only working 60%. HOT 2
- Interupt functions not getting called HOT 4
- Compatible with Arduino Pro-Mini? HOT 3
- interrupt on analog port
- interrupt on analog port HOT 1
- Incompatible with oficial SoftwareSerial library? HOT 1
- Issues with Arduino Mega HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-pinchangeint.