Radiohead library

Discussion in 'UDOO NEO' started by gheesung, May 21, 2017.

  1. gheesung

    gheesung New Member

    Joined:
    Apr 16, 2017
    Messages:
    12
    Likes Received:
    2
    I am trying to compile the radiohead sample code for Neo but I have problem compiling. Has anyone successfully get it to work?

    Code:
    #include <RH_ASK.h>
    #include <SPI.h> // Not actually used but needed to compile
    
    RH_ASK driver;
    //RH_ASK driver(2000, 2, 4, 5); // ESP8266: do not use pin 11
    
    void setup()
    {
        Serial.begin(9600);      // Debugging only
        if (!driver.init())
             Serial.println("init failed");
    }
    
    void loop()
    {
        const char *msg = "hello";
    
        driver.send((uint8_t *)msg, strlen(msg));
        driver.waitPacketSent();
        Serial.println("Packet Sent");
        delay(2000);
    }

    Code:
    D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::attachInterrupt()':
    
    D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:49:9: error: 'class SPIClass' has no member named 'attachInterrupt'
         SPI.attachInterrupt();
             ^
    
    D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::detachInterrupt()':
    
    D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:56:9: error: 'class SPIClass' has no member named 'detachInterrupt'
         SPI.detachInterrupt();
             ^
    
    D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::begin()':
    
    D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:98:29: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'BitOrder' [-fpermissive]
         SPI.setBitOrder(bitOrder);
                                 ^
    In file included from D:\devl\Arduino\libraries\RadioHead/RadioHead.h:812:0,
                     from D:\devl\Arduino\libraries\RadioHead/RHGenericSPI.h:10,
                     from D:\devl\Arduino\libraries\RadioHead/RHHardwareSPI.h:10,
                     from D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:7:
    C:\Users\gheesung\AppData\Local\Arduino15\packages\UDOO\hardware\solox\1.6.7\libraries\SPI/SPI.h:46:7: note: initializing argument 1 of 'void SPIClass::setBitOrder(BitOrder)'
      void setBitOrder(BitOrder);
           ^
    D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:28:27: error: 'VARIANT_MCK' was not declared in this scope
      #define SPI_CLOCK_DIV16 (VARIANT_MCK/84000000) // 1MHz
                               ^
    D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:107:16: note: in expansion of macro 'SPI_CLOCK_DIV16'
          divider = SPI_CLOCK_DIV16;
                    ^
    D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:137:9: error: 'class SPIClass' has no member named 'setClockDivider'
         SPI.setClockDivider(divider);
             ^
    D:\devl\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:140:9: error: 'class SPIClass' has no member named 'setClockDivider'
         SPI.setClockDivider(divider);
             ^
    exit status 1
    Error compiling for board UDOO Neo (Cortex M4).
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    The SPI library of the Neo is not compatible with the latest Arduino one. That is why you get these errors.

    We as an community have not been able to find a solution. See also known Arduino issues thread in my signature.

    Edit: Typo
     
    Last edited: May 23, 2017
  3. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    And unfortunately UDOO has neither. I had some hope that after they had shipped the X86 they would have time to put focus on finishing the issues for the Neo, but I'm afraid that they may have lost interest or that they will be busy with completing the X86 for a while.
     
  4. gheesung

    gheesung New Member

    Joined:
    Apr 16, 2017
    Messages:
    12
    Likes Received:
    2
    Thanks for the headup.

    As an user of product, I do not have the capability to debug a low level issue. I maybe better-off put aside this board and spending the time build my application using other product in the market.

    I hope UDOO team can provide a solution or a driver to overcome this limitation soon. I have both Neo and Quad, but kinda like Neo. If these highlighted problems cannot be resolved, Neo can only be a hobbyist toy.
     
  5. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    I'm even putting aside the Neo for my home toy projects, replacing them with a normal Arduino+XBee combination. I will be investigating if I can replace in one of the projects the Neo with my Quad, but if not it will be more or less the same route, Arduino+RF.
     
  6. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    There is some action going on (other protocol for virtual serial device, a prerequisite for a new linux kernel)
    Hoping that the other issues will be adressed directly after that.
     
  7. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    Not sure what action your expecting, but that change is just for porting rpsmg support to MQX which in itself is EOL (dropped by NXP for imx6sx). Therefore supporting a newer kernel may also be problematic.
     
    Last edited: May 24, 2017

Share This Page