paulstoffregen / softwareserial Goto Github PK
View Code? Open in Web Editor NEWSoftwareSerial library used on Teensy
SoftwareSerial library used on Teensy
Hi Paul,
I encountered an issue with SoftwareSerial and PCINT. After researching I found modifying the SoftwareSerial.cpp file to avoid the port group that I was using for PCINT ought to work. I found your version on GitHub and used it for my purposes. I just commented out the def for PCINT1 and it has worked so far.
/*#if defined(PCINT1_vect)
ISR(PCINT1_vect)
{
SoftwareSerial::handle_interrupt();
}
*/
Now, is it possible to move these port group defs to a "User_Setup.h" file so that SoftwareSerial will read that first to determine which ports to monitor for serial activity, giving guys like me an easier path to changing and avoiding the PCINT conflict? I would love it if these defs could be in the Arduino .ino file for ease of set up and access, is this possible?
Thanks,
John
The library doesn't support Arduino Due
error: #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors
I am using the softwareserial library with RX=TX for Pin 0 on XIAO Seeed but I get no output signal. When I am spliting the RX / TX on PIN 0 and PIN 2 e.g. it works as expected.
//RX=TX
#include <SoftwareSerial.h>
SoftwareSerial mySerial(0, 0, true); // RX, TX, true =inverted
Is possible change the format 8N1 for all the others ?
I am using Feather M4 Express (ATSAMD51 controller on it) and I am unable to compile the code.
lib/SoftwareSerial/SoftwareSerial.cpp:362:2: error: #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors
Alguém usou em um esp32 não estou tendo exito.
Hi,
I noticed an issue when building in debug
mode with compiler optimization is switched off. This library wouldn't build anymore. Doing some research online, I found this solution which works perfectly on my branch.
In fact, to fix this just a single character change in SoftwareSerial.cpp
is required in line 406 : "+r" (delay), "+a" (tmp)
the +r
needs to be exchanged with +w
and that's it.
Here's my original thread on the platformio project: https://community.platformio.org/t/project-inspection-error-register-r24-r26-r28-or-r30-required/18648?u=schallbert
Hello there. Your library is available on platformio libraries and is signed as compatible with Nordic nRF51 platform. Apparently, it doesn't compile there
https://platformio.org/lib/show/7212/SoftwareSerial
.pio\libdeps\waveshare_ble400\SoftwareSerial_ID7212\SoftwareSerial.cpp: In member function 'bool SoftwareSerial::listen()':
.pio\libdeps\waveshare_ble400\SoftwareSerial_ID7212\SoftwareSerial.cpp:341:23: error: 'SREG' was not declared in this scope
uint8_t oldSREG = SREG;
^~~~
.pio\libdeps\waveshare_ble400\SoftwareSerial_ID7212\SoftwareSerial.cpp:341:23: note: suggested alternative: 'SING'
uint8_t oldSREG = SREG;
^~~~
SING
.pio\libdeps\waveshare_ble400\SoftwareSerial_ID7212\SoftwareSerial.cpp:342:5: error: 'cli' was not declared in this scope
cli();
^~~
In file included from .pio\libdeps\waveshare_ble400\SoftwareSerial_ID7212\SoftwareSerial.cpp:43:0:
.pio\libdeps\waveshare_ble400\SoftwareSerial_ID7212\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setTX(uint8_t)':
C:\Users\xxxxxx.platformio\packages\framework-arduinonordicnrf5\cores\nRF5/Arduino.h:95:38: error: invalid conversion from 'NRF_
GPIO_Type*' to 'uint8_t {aka unsigned char}' [-fpermissive]
#define digitalPinToPort(P) ( &(NRF_GPIO[P]) )
~~^~~~~~~~~~~~~~~~
.pio\libdeps\waveshare_ble400\SoftwareSerial_ID7212\SoftwareSerial.cpp:517:18: note: in expansion of macro 'digitalPinToPort'
uint8_t port = digitalPinToPort(tx);
^~~~~~~~~~~~~~~~
C:\Users\xxxxxx.platformio\packages\framework-arduinonordicnrf5\cores\nRF5/Arduino.h:98:44: error: base operand of '->' is not a
pointer
#define portOutputRegister(port) ( &(port->OUTSET) )
^
.pio\libdeps\waveshare_ble400\SoftwareSerial_ID7212\SoftwareSerial.cpp:518:27: note: in expansion of macro 'portOutputRegister'
_transmitPortRegister = portOutputRegister(port);
Need to add a section to the cpp file and check for: ARDUINO_TEENSY_MICROMOD
Probably like:
// Teensy MICROMOD
#elif defined(__IMXRT1062__) && defined(ARDUINO_TEENSY_MICROMOD)
#define SS1_RX 0
#define SS1_TX 1
#define SS2_RX 16
#define SS2_TX 17
#define SS3_RX 15
#define SS3_TX 14
#define SS4_RX 7
#define SS4_TX 8
#define SS5_RX 21
#define SS5_TX 20
#define SS6_RX 25
#define SS6_TX 24
#define SS7_RX 28
#define SS7_TX 29
I am trying to compile the example given in the library ("SoftwareSerialExample.ino") and Arduino IDE gives me an error saying:
In file included from C:\Users\myusername\Downloads\SoftwareSerial-master\examples\SoftwareSerialExample\SoftwareSerialExample.ino:28:0: SoftwareSerial.h:36:20: error: Stream.h: No such file or directory #include <Stream.h> ^ compilation terminated.
Where can I find the library Stream
?
Hello, the software serial library causes a conflict with the servo library, the servo jerks, performs micro-movements, etc. the problem is caused by the use of the same timers by both libraries and the blocking time countdown in the software serial library.
This library is not work with the arduino due i m facing some errore How to solve that errore
the errore is of util/delay.h and portmanuplation error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.