Skip to content
  • How to use SoftwareSerial Library?

    Development softwareserial rs485 arduino nano
    16
    0 Votes
    16 Posts
    6k Views
    kduinoK
    Hi PJR, now it is working with this code in the MyTransportRS485 without any changes on MySensors.h: #if defined(MY_RS485_SWSERIAL) SoftwareSerial& _dev = MY_RS485_SWSERIAL; #elif defined(__linux__) SerialPort _dev = SerialPort(MY_RS485_HWSERIAL); #elif defined(MY_RS485_HWSERIAL) HardwareSerial& _dev = MY_RS485_HWSERIAL; #else AltSoftSerial _dev; #endif As far as I can interpret the peace of code, the #include "hal/transport/MyTransportRS485.cpp" is active as soon as the MY_RS485 layer is defined. This is a great step, I can use all my nodes from now on! Thank you very much for your support! By Kduino
  • 0 Votes
    5 Posts
    8k Views
    R
    Managed to find out a solution by myself. removed the three #define NO_PORTx_PINCHANGES removed the #include <PinChangeInt.h> changed PCintPort::attachInterrupt(pinInclusion, startInclusionInterrupt, RISING); to attachInterrupt(1, startInclusionInterrupt, RISING); Now I am able to use the Seeedstudip GPRS shield pins 7 and 8 with SoftwareSerial.

10

Online

11.7k

Users

11.2k

Topics

113.1k

Posts