Last active
August 17, 2022 13:11
-
-
Save idriszmy/7e7076d340f2cbf7570073ba3058c3cd to your computer and use it in GitHub Desktop.
Connect RP2040 + ESP8266 board to the new Blynk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Connect RP2040 + ESP8266 board to the new Blynk (https://blynk.io) | |
Items: | |
- Maker Nano RP2040 | |
https://my.cytron.io/maker-nano-rp2040-simplifying-projects-with-raspberry-pi-rp2040 | |
- Grove WiFi 8266 | |
https://my.cytron.io/p-grove-wifi-8266-iot-for-microbit-and-beyond | |
Connections | |
- Grove WiFi to Maker port [0, 1] | |
External libraries: | |
- Blynk by Volodymyr Shymanskyy 1.1.0 (Library Manager) | |
- BlynkESP8266 (https://github.com/vshymanskyy/BlynkESP8266) | |
*/ | |
#define BLYNK_PRINT Serial | |
#define BLYNK_TEMPLATE_ID "YourTemplateID" | |
#include <ESP8266_Lib.h> | |
#include <BlynkSimpleShieldEsp8266.h> | |
char auth[] = "YourAuthToken"; | |
char ssid[] = "YourNetworkName"; | |
char pass[] = "YourPassword"; | |
#define EspSerial Serial1 | |
#define ESP8266_BAUD 115200 | |
ESP8266 wifi(&EspSerial); | |
void setup() | |
{ | |
Serial.begin(115200); | |
delay(10); | |
EspSerial.begin(ESP8266_BAUD); | |
EspSerial.println("AT+RST"); | |
delay(5000); | |
Blynk.begin(auth, wifi, ssid, pass); | |
} | |
void loop() | |
{ | |
Blynk.run(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment