MY_SOFTSPI in MySensors 2.0 clashes with built-in Arduino SD-Card Library



  • Here is how to reproduce the problem:

    Use:

    • Latest (as of this write-up; SD Built-In by Arduino, Sparkfun 1.08) standard SD Card library from Arduino.
    • Latest MySensors libraries (2.0.0).

    Try to compile the following sketch:
    #include <SPI.h>
    #include <SD.h>
    #define MY_RADIO_NRF24
    #define MY_SOFTSPI
    #include <MySensors.h>

    The following error is reported:
    DigitalPin.h:41:8: error: redefinition of 'struct pin_map_t'

    Maybe something should be conditionally included inside MySensors.h or thereafter within.
    Otherwise, most likely it will clash with other libraries that include the same thing(s).

    Cheers,
    Jordan


 

480
Online

7.9k
Users

8.7k
Topics

93.6k
Posts