Member #483997

Member Since: October 31, 2013

Country: United States

  • Product DEV-10039 | about 6 months ago

    Is there any way to change this library for the Arduino Mega?

    Other libraries have this in the “defaults.h” but I can not find it in this library like shown below.

    SPI bus pins 10-13 of the shield to 50-53 of the Mega 2560 as follows:

    Mega CAN bus shield 51 11 (SPI MOSI) 50 12 (SPI MISO) 52 13 (SPI SCK) 53 10 (SPI CS) But, the final trick to get the SKPang software to work properly was to modify the port assignments in file “defaults.h” as follows:

    // Atmega 168/328 pin mapping
    //#define   P_MOSI      B,3 // pin 11
    //#define   P_MISO      B,4 // pin 12
    //#define   P_SCK       B,5 // pin 13
    //#define   MCP2515_CS  B,2 // pin 10
    //#define   MCP2515_INT D,2 // pin 2
    //#define   LED2_HIGH   B,0 // pin 8
    //#define   LED2_LOW    B,0 // pin 8
    
    // Pins remapped to Arduino Mega 2560
    #define P_MOSI          B,2 // pin 51
    #define P_MISO          B,3 // pin 50
    #define P_SCK           B,1 // pin 52
    #define MCP2515_CS      B,0 // pin 53
    #define MCP2515_INT     E,4 // pin 2
    #define LED2_HIGH       H,5 // pin 8
    #define LED2_LOW        H,5 // pin 8
    

    Any help would be appreciated.

No public wish lists :(