Go Down

Topic: Cool Feature: SoftwareSerial To HardwareSerial "Proxy" (Read 761 times) previous topic - next topic

sigi

Found from Teensy 1.14 Release Notes:
Added partial SoftwareSerial for Teensy 3.0. If the pins match one of the real serial ports, hardware serial is used. This allows use of libraries that are hard-coded for SoftwareSerial.

That's exactly what I needed for some time ago for MEGA or Leonardo. Maybe somebody has the skills to port this to Arduino IDE?

regards Beat

MarsWarrior

The same approach would be nice for hardware and software SPI / I2C too.
Some libraries simply do work with hardware SPI / I2C, but are not easy (for me at least) modified to use software SPI / I2C...

robtillaart


that would mean that software serial detects which board it runs, then checks if the pins are in a list of HW ports and call the HW serial instead?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Jantje

I did something similar but far more basic for my RC lib
Basically I printed a warning during compile time when you are not using software serial and need it.
https://github.com/jantje/libraries/tree/master/RCLib
Best regards
Jantje

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Go Up