Hi
I tested this code with 1 module of 1 relay and it works perfectly mcu STC15F104W
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You must obtain the authentication token from the Blynk application.
// Go to the project settings (nut icon).
char auth [] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx";
// Your WiFi credentials.
// Set the password to "" for open networks.
char ssid [] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
char pass [] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
byte relON [] = {0xA0, 0x01, 0x01, 0xA2}; // Hex command to send to serial for
byte relOFF [] = {0xA0, 0x01, 0x00, 0xA1}; // Hexadecimal command to send to serial for closing retransmission
void setup ()
{
// Debug console
Serial.begin (115200);
Blynk.begin (auth, ssid, pass);
}
// Relay on off
BLYNK_WRITE (V0) {
int button = param.asInt (); // read button
if (button == 1) {
Serial.write (relON, sizeof (relON));
}
else {
Serial.write (relOFF, sizeof (relOFF));
}
}
void loop ()
{
Blynk.run ();
}
after that I tried to use with the same code, changing to 4 relay, in module of lctech 4 relay with mcu nuvotoc NT6E003 and dónt work .
i tried the module with original firmware AT and work fine with app easyTCP in android .
can someone help me, because with the easyTPC app it only works locally and I wanted to use Blynk to access it via the internet