Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Arduino Nano RP2040 Connect #574

Closed
kasperkamperman opened this issue Nov 29, 2022 · 1 comment
Closed

Support for Arduino Nano RP2040 Connect #574

kasperkamperman opened this issue Nov 29, 2022 · 1 comment

Comments

@kasperkamperman
Copy link

Blynk library version: 1.0.1
IDE: Arduino
IDE version: 2.0.3
Board type: Arduino Nano RP2040

Scenario, steps to reproduce

I'm running a script based on BlynkSimpleWiFiNINA.h.
The RP2040 has the same WiFi chip as the Nano 33 IoT.

Code:

#include "arduino_secrets.h"

// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial

#include <WiFiNINA.h>
#include <BlynkSimpleWiFiNINA.h>

// DEFINE YOUR SENSITIVE DATA IN THE TAB: 
// arduino_secrets.h

char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] = SECRET_SSID;       // your network SSID (name)
char pass[] = SECRET_PASS;       // your network passwork

int ledValue = 0;

void setup() {
  pinMode(10, OUTPUT);
  Serial.begin(57600);
  Blynk.begin(auth, ssid, pass);
  Serial.println("Ready to loop!");
  delay(2000);
}

void loop() {
  Blynk.run();
  int joyXValue = analogRead(1); // read joyXValue
  Blynk.virtualWrite(V0, joyXValue); // set Virtual pin V0 to the joyXValue
  analogWrite(10,ledValue); // write ledValue
}

// When V1 (slider in our dashboard) changes update the ledValue variable. 
BLYNK_WRITE(V1) { 
  // set ledValue to the received value from V1
  ledValue = param.asInt();
}

// When blink is connected sync the value of Virtual Pin 1. 
BLYNK_CONNECTED() { 
  Blynk.syncVirtual(V1);  
}

Expected Result

I understand the Nano RP2040 Connect is not supported yet, but it would be great if it will be.

Actual Result

There is a compile issue with the Timer.

/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp:166:12: error: 'Timer' does not name a type; did you mean 'time'?
     static Timer  blynk_millis_timer;
            ^~~~~
            time
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp:167:12: error: 'Ticker' does not name a type; did you mean 'Socket'?
     static Ticker blynk_waker;
            ^~~~~~
            Socket
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp: In function 'void BlynkSystemInit()':
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp:177:9: error: 'blynk_waker' was not declared in this scope
         blynk_waker.attach(&blynk_wake, 2.0);
         ^~~~~~~~~~~
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp:177:9: note: suggested alternative: 'blynk_wake'
         blynk_waker.attach(&blynk_wake, 2.0);
         ^~~~~~~~~~~
         blynk_wake
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp:178:9: error: 'blynk_millis_timer' was not declared in this scope
         blynk_millis_timer.start();
         ^~~~~~~~~~~~~~~~~~
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp:178:9: note: suggested alternative: 'millis_time_t'
         blynk_millis_timer.start();
         ^~~~~~~~~~~~~~~~~~
         millis_time_t
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp: In function 'void BlynkDelay(millis_time_t)':
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp:183:9: error: 'wait_ms' was not declared in this scope
         wait_ms(ms);
         ^~~~~~~
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp:183:9: note: suggested alternative: 'wait_ns'
         wait_ms(ms);
         ^~~~~~~
         wait_ns
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp: In function 'millis_time_t BlynkMillis()':
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp:188:16: error: 'blynk_millis_timer' was not declared in this scope
         return blynk_millis_timer.read_ms();
                ^~~~~~~~~~~~~~~~~~
/Documents/Arduino/libraries/Blynk/src/utility/BlynkDebug.cpp:188:16: note: suggested alternative: 'millis_time_t'
         return blynk_millis_timer.read_ms();
                ^~~~~~~~~~~~~~~~~~
                millis_time_t

exit status 1
@vshymanskyy
Copy link
Collaborator

There are no plans to support RP2040 Connect via the official Core.
It would work without issues with https://github.com/earlephilhower/arduino-pico core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants