Code:
#define RXD2 16
#define TXD2 19
const int ledPin = 22;
const char* ssid = "your-ssid"; // WiFi SSID
const char* password = "your-password"; // WiFi password
void setup() {
pinMode(ledPin, OUTPUT); // Set ledPin as an output
delay(10);
// Connect to WiFi
WiFi.begin(ssid, password);
// Wait until WiFi is connected
while (WiFi.status() != WL_CONNECTED) {
delay(500);
}
// Setup serial communication
Serial.begin(9600); // Begin Serial communication for monitoring
//Serial1.begin(9600, SERIAL_8N1, RXD2, TXD2); // Uncomment if Serial1 is used
Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2); // Begin Serial2 communication
}
void loop() {
// Control the LED to blink
digitalWrite(ledPin, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(ledPin, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
YouTube: https://www.youtube.com/c/KinCony
Online Store: https://shop.kincony.com
Alibaba Store: https://kincony.en.alibaba.com/
Online Store: https://shop.kincony.com
Alibaba Store: https://kincony.en.alibaba.com/


