Thanks for the replies–
sipan1313-- thanks for the general info. I was aware of the need for two objects for the code to work. I usually run an example before I start coding my own project. The compiler failed to compile an example sketch; I don’t remember exactly which one.
paulvha-- error dump below. The compiler was exceedingly unhappy… I’m a decent intermediate grade programmer but not the most savvy by any means. I depend on libraries a lot so I don’t understand all of the subtleties. However, after doing some research and reading, looks like the problem is with the mBed core not supporting all the SPI functions. I would not know how to alter the code to make this work.
FWIW, I ended up using the LoRa library by Sandeep Mistry. Easy to use and seems to be reliable. I had to add some simple extra message filtering code to allow addressing a single unit out of three deployed, but that was a lot easier than messing with the hardware interface. Appreciate your interest.
Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: “Artemis Thing Plus, 460800, SparkFun Variable Loader (Recommended)”
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function ‘virtual void RHHardwareSPI::begin()’:
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:79:9: error: ‘class arduino::MbedSPI’ has no member named ‘setDataMode’
SPI.setDataMode(dataMode);
^~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:92:9: error: ‘class arduino::MbedSPI’ has no member named ‘setBitOrder’
SPI.setBitOrder(bitOrder);
^~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:28:27: error: ‘VARIANT_MCK’ was not declared in this scope
#define SPI_CLOCK_DIV16 (VARIANT_MCK/84000000) // 1MHz
^~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:102:16: note: in expansion of macro ‘SPI_CLOCK_DIV16’
divider = SPI_CLOCK_DIV16;
^~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:28:27: note: suggested alternative: ‘VARIANT_SPI_CLK’
#define SPI_CLOCK_DIV16 (VARIANT_MCK/84000000) // 1MHz
^~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:102:16: note: in expansion of macro ‘SPI_CLOCK_DIV16’
divider = SPI_CLOCK_DIV16;
^~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:131:9: error: ‘class arduino::MbedSPI’ has no member named ‘setClockDivider’
SPI.setClockDivider(divider);
^~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp: In member function ‘uint8_t RH_ASK::timerCalc(uint16_t, uint16_t, uint16_t*)’:
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:118:40: error: ‘F_CPU’ was not declared in this scope
unsigned long inv_clock_time = F_CPU / ((unsigned long)prescalerValue);
^~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:118:40: note: suggested alternative: ‘FPU’
unsigned long inv_clock_time = F_CPU / ((unsigned long)prescalerValue);
^~~~~
FPU
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp: In member function ‘void RH_ASK::timerSetup()’:
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:209:5: error: ‘pmc_set_writeprotect’ was not declared in this scope
pmc_set_writeprotect(false);
^~~~~~~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:208:34: error: ‘TC1_IRQn’ was not declared in this scope
#define RH_ASK_DUE_TIMER_IRQ TC1_IRQn
^~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:210:27: note: in expansion of macro ‘RH_ASK_DUE_TIMER_IRQ’
pmc_enable_periph_clk(RH_ASK_DUE_TIMER_IRQ);
^~~~~~~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:208:34: note: suggested alternative: ‘RTC_IRQn’
#define RH_ASK_DUE_TIMER_IRQ TC1_IRQn
^~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:210:27: note: in expansion of macro ‘RH_ASK_DUE_TIMER_IRQ’
pmc_enable_periph_clk(RH_ASK_DUE_TIMER_IRQ);
^~~~~~~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:210:5: error: ‘pmc_enable_periph_clk’ was not declared in this scope
pmc_enable_periph_clk(RH_ASK_DUE_TIMER_IRQ);
^~~~~~~~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:214:20: error: ‘VARIANT_MCK’ was not declared in this scope
uint32_t rc = (VARIANT_MCK / _speed) / 128 / 8;
^~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:214:20: note: suggested alternative: ‘VARIANT_SPI_CLK’
uint32_t rc = (VARIANT_MCK / _speed) / 128 / 8;
^~~~~~~~~~~
VARIANT_SPI_CLK
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:206:30: error: ‘TC0’ was not declared in this scope
#define RH_ASK_DUE_TIMER TC0
^~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:215:18: note: in expansion of macro ‘RH_ASK_DUE_TIMER’
TC_Configure(RH_ASK_DUE_TIMER, RH_ASK_DUE_TIMER_CHANNEL,
^~~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:216:4: error: ‘TC_CMR_WAVE’ was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP_RC | TC_CMR_TCCLKS_TIMER_CLOCK4);
^~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:216:18: error: ‘TC_CMR_WAVSEL_UP_RC’ was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP_RC | TC_CMR_TCCLKS_TIMER_CLOCK4);
^~~~~~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:216:40: error: ‘TC_CMR_TCCLKS_TIMER_CLOCK4’ was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP_RC | TC_CMR_TCCLKS_TIMER_CLOCK4);
^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:215:5: error: ‘TC_Configure’ was not declared in this scope
TC_Configure(RH_ASK_DUE_TIMER, RH_ASK_DUE_TIMER_CHANNEL,
^~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:217:5: error: ‘TC_SetRC’ was not declared in this scope
TC_SetRC(RH_ASK_DUE_TIMER, RH_ASK_DUE_TIMER_CHANNEL, rc);
^~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:219:69: error: ‘TC_IER_CPCS’ was not declared in this scope
RH_ASK_DUE_TIMER->TC_CHANNEL[RH_ASK_DUE_TIMER_CHANNEL].TC_IER = TC_IER_CPCS;
^~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:222:5: error: ‘TC_Start’ was not declared in this scope
TC_Start(RH_ASK_DUE_TIMER, RH_ASK_DUE_TIMER_CHANNEL);
^~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:222:5: note: suggested alternative: ‘va_start’
TC_Start(RH_ASK_DUE_TIMER, RH_ASK_DUE_TIMER_CHANNEL);
^~~~~~~~
va_start
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp: In function ‘void TC1_Handler()’:
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:498:18: error: ‘TC0’ was not declared in this scope
TC_GetStatus(TC0, 1);
^~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:498:5: error: ‘TC_GetStatus’ was not declared in this scope
TC_GetStatus(TC0, 1);
^~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:498:5: note: suggested alternative: ‘SocketStats’
TC_GetStatus(TC0, 1);
^~~~~~~~~~~~
SocketStats
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_RF22.cpp: In member function ‘virtual bool RH_RF22::init()’:
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_RF22.cpp:80:28: error: ‘NOT_AN_INTERRUPT’ was not declared in this scope
if (interruptNumber == NOT_AN_INTERRUPT)
^~~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_RF22.cpp:80:28: note: suggested alternative: ‘AM_HAL_INTERRUPT_H’
if (interruptNumber == NOT_AN_INTERRUPT)
^~~~~~~~~~~~~~~~
AM_HAL_INTERRUPT_H
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_RF69.cpp: In member function ‘virtual bool RH_RF69::init()’:
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_RF69.cpp:91:28: error: ‘NOT_AN_INTERRUPT’ was not declared in this scope
if (interruptNumber == NOT_AN_INTERRUPT)
^~~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_RF69.cpp:91:28: note: suggested alternative: ‘AM_HAL_INTERRUPT_H’
if (interruptNumber == NOT_AN_INTERRUPT)
^~~~~~~~~~~~~~~~
AM_HAL_INTERRUPT_H
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_RF95.cpp: In member function ‘virtual bool RH_RF95::init()’:
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_RF95.cpp:41:28: error: ‘NOT_AN_INTERRUPT’ was not declared in this scope
if (interruptNumber == NOT_AN_INTERRUPT)
^~~~~~~~~~~~~~~~
C:\Users\Ed__XXX\Documents\Arduino\libraries\RadioHead\RH_RF95.cpp:41:28: note: suggested alternative: ‘AM_HAL_INTERRUPT_H’
if (interruptNumber == NOT_AN_INTERRUPT)
^~~~~~~~~~~~~~~~
AM_HAL_INTERRUPT_H
exit status 1
Error compiling for board Artemis Thing Plus.
This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.