BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk_millis_timer, 'blynk_waker', 'wait_ms' was not declared in this scope

Hello Fellow Blynkers,
I get the below error each time I try to compile the blynk code. I have tried compiling the Blynk 1.0.1 and also tried Blynk Library master and every time, I get the below error. I have installed all necessary packages including millis.timer. Please help.
Board Info
Arduino RP2040
Using the MKR1010 sketch.

C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp:151:12: error: 'Timer' does not name a type; did you mean 'time'?
     static Timer  blynk_millis_timer;
            ^~~~~
            time
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp:152:12: error: 'Ticker' does not name a type; did you mean 'Socket'?
     static Ticker blynk_waker;
            ^~~~~~
            Socket
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp: In function 'void BlynkSystemInit()':
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp:162:9: error: 'blynk_waker' was not declared in this scope
         blynk_waker.attach(&blynk_wake, 2.0);
         ^~~~~~~~~~~
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp:162:9: note: suggested alternative: 'blynk_wake'
         blynk_waker.attach(&blynk_wake, 2.0);
         ^~~~~~~~~~~
         blynk_wake
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp:163:9: error: 'blynk_millis_timer' was not declared in this scope
         blynk_millis_timer.start();
         ^~~~~~~~~~~~~~~~~~
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp:163:9: note: suggested alternative: 'millis_time_t'
         blynk_millis_timer.start();
         ^~~~~~~~~~~~~~~~~~
         millis_time_t
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp: In function 'void BlynkDelay(millis_time_t)':
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp:168:9: error: 'wait_ms' was not declared in this scope
         wait_ms(ms);
         ^~~~~~~
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp:168:9: note: suggested alternative: 'wait_ns'
         wait_ms(ms);
         ^~~~~~~
         wait_ns
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp: In function 'millis_time_t BlynkMillis()':
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp:173:16: error: 'blynk_millis_timer' was not declared in this scope
         return blynk_millis_timer.read_ms();
                ^~~~~~~~~~~~~~~~~~
C:\Users\dipot\Documents\Arduino\libraries\blynk-library-master\src\utility\BlynkDebug.cpp:173:16: note: suggested alternative: 'millis_time_t'
         return blynk_millis_timer.read_ms();
                ^~~~~~~~~~~~~~~~~~
                millis_time_t
exit status 1
Error compiling for board Arduino Nano RP2040 Connect.

Do you mean Edgent_MKR1010 ?

Hello John, good to hear from you again. Yes, MKR1010.

So not the Edgent example for the MKR1010 then?

The Arduino RP2040 appears to be a Raspberry Pi based board, and isn’t in Blynk’s list of supported hardware, so I’m not sure if it will work with the MKR1010 example sketch.

Pete.

Yes, this sketch is for SAMD microcontroller based boards. Unfortunately your board is not compatible.
I highly recommend you to use esp32 or nodemcu ?

Hello Pete,
My apologies for the confusion. I am using the Edgent_MKR1010 sketch with Board Arduino Nano RP2040.

Do you think that is why, I am getting the Blynk milli timer error?

I guess, I tried three sketches non of them work.
Same error.

Thank you so very much John and Pete. Much appreciated. I will stick to SAMD board approved boards. Thank you, guys.

Personally, I’d go for ESP8266 or ESP32 boards.

Pete.

@PeteKnight your absolutely right, I always recommend people to use esp32 or nodemcu. The esp32 has the advantage in my opinion.

Thank you Pete and John. Duly noted. The problem with esp8266 and esp32 is their large form factor. Not really conducive for my project but I have no other choice but to use them. Thank you.

The Wemos D1 Mini or D1 Mini ESP32 are quite small, although the pin layout on the Mini ESP32 can be difficult to work with unless you use a custom PCB.

Pete.

The Arduino rp2040 is 18mm x 45mm the esp32 is 28mm x 57mm almost the same size.

Thank you for your suggestion Pete. I was using Nano 33 iot before I went with the rp2040 and it worked perfectly even with Blynk cloud. The reason I switched to rp2040 was the embedded eeprom and the added feature like in-built mic for voice command and the 6 axis sensor. You dont have to buy additional sensors.

True that. It is mini. Thank you, John.

1 Like

Your welcome buddy.