OpenRB150 with RC100

Hi,

I am using OpenRB150 to replace the previous OpenCM controller. However, when I was using it with my previous code where the RC100 library was used. The compiling error happens and is listed below. Please can anyone let me know why this error happened and how to solve it?

ERROR:
Arduino: 1.8.15 Hourly Build 2021/05/31 10:33 (Windows 10), Board: “OpenRB-150”

C:\Users\48091\AppData\Local\Arduino15\packages\OpenRB-150\hardware\samd\0.2.1\libraries\RC100\RC100.cpp: In member function ‘bool RC100::rc100Update(uint8_t)’:

C:\Users\48091\AppData\Local\Arduino15\packages\OpenRB-150\hardware\samd\0.2.1\libraries\RC100\RC100.cpp:99:7: error: ‘millis’ was not declared in this scope

if (millis()-time_t > 100)

   ^~~~~~

C:\Users\48091\AppData\Local\Arduino15\packages\OpenRB-150\hardware\samd\0.2.1\libraries\RC100\RC100.cpp:99:7: note: suggested alternative: ‘malloc’

if (millis()-time_t > 100)

   ^~~~~~

   malloc

C:\Users\48091\AppData\Local\Arduino15\packages\OpenRB-150\hardware\samd\0.2.1\libraries\RC100\RC100.cpp:110:18: error: ‘millis’ was not declared in this scope

     time_t = millis();

              ^~~~~~

C:\Users\48091\AppData\Local\Arduino15\packages\OpenRB-150\hardware\samd\0.2.1\libraries\RC100\RC100.cpp:110:18: note: suggested alternative: ‘malloc’

     time_t = millis();

              ^~~~~~

              malloc

exit status 1

Error compiling for board OpenRB-150.

This report would have more information with “Show verbose output during compilation” option enabled in File → Preferences.

This issue is documented in my Arduino book

You can check out the free Kindle sample and look for Fig. 2.5 for a solution. Also there is plenty of details on how to use the RC-100 protocol with the OpenRB-150 in the free Kindle sample.

1 Like

Thanks very much! The issue has been solved!

The screenshot is attached in case anyone has difficulty accessing the solution in the reference book.
Snipaste_2024-03-06_15-29-52

1 Like