SlideShare a Scribd company logo
1 of 8
#include <ArduinoJson.h>
#include <SoftwareSerial.h>
#define BLYNK_TEMPLATE_ID "TMPLCKaGjlz5"
#define BLYNK_DEVICE_NAME "IOT"
#define BLYNK_FIRMWARE_VERSION "0.1.0"
#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG
#define APP_DEBUG
#include "BlynkEdgent.h"
const byte Rx= 12;
const byte Tx =14;
SoftwareSerial myserial=SoftwareSerial(Rx,Tx); //Rx-Tx
void sendata(String(thamso1),String(thamso2),String(thamso3));
void control_pump(void);
void read_esp(void);
void xulyjson(String Data);
void send_lenh(void);
String nhiet_do_nhan="";
String do_am_nhan="";
String cd_sang_nhan="";
String do_am_dat_nhan="";
String DataUart="";
String DataSend= "";
String Datapump="";
String Dataled= "";
String Dataquat= "";
int trang_thai_bom;
int trang_thai_led;
int trang_thai_quat;
int led;
int pump1;
int quat;
int nhiet_do_set;
int do_am_dat_set;
long t = 0;
int che_do;
/////////////////////////////////////////
void setup()
{
myserial.begin(9600);// 8-8,7-9
Serial.begin(9600);
delay(100);
BlynkEdgent.begin();
t= millis();
Blynk.syncAll();
BLYNK_CONNECTED ();
}
BLYNK_WRITE(V4)
{
pump1 = param.asInt();
if(che_do==0)
{
if(pump1==1 && trang_thai_bom==0)
{
myserial.println("{"chedo":"0"}");
Serial.println("{"chedo":"0"}");
myserial.println("{"pump":"1"}");
Serial.println("{"pump":"1"}");
myserial.flush();
delay(100);
}
else if(pump1==0 && trang_thai_bom==1)
{
myserial.println("{"chedo":"0"}");
Serial.println("{"chedo":"0"}");
myserial.println("{"pump":"0"}");
Serial.println("{"pump":"0"}");
myserial.flush();
delay(100);
}
}
}
BLYNK_WRITE(V5)
{
nhiet_do_set = param.asInt();
delay(100);
if(che_do==1)
{
sendata(String (che_do), String(nhiet_do_set),String (do_am_dat_set));
}
}
BLYNK_WRITE(V6)
{
led = param.asInt();
if(che_do==0)
{
if(led==1 && trang_thai_led==0)
{
myserial.println("{"led":"1"}");
Serial.println("{"led":"1"}");
myserial.flush();
delay(100);
}
else if(led==0 && trang_thai_led==1)
{
myserial.println("{"led":"0"}");
Serial.println("{"led":"0"}");
myserial.flush();
delay(100);
}
}
}
BLYNK_WRITE(V7)
{
che_do= param.asInt();
sendata(String (che_do), String(nhiet_do_set),String (do_am_dat_set));
}
BLYNK_WRITE(V8)
{
do_am_dat_set = param.asInt();
delay(100);
if(che_do==1)
{
sendata(String (che_do), String(nhiet_do_set),String (do_am_dat_set));
}
}
BLYNK_WRITE(V9)
{
quat = param.asInt();
if(che_do==0)
{
if(quat==1 && trang_thai_quat==0)
{
myserial.println("{"chedo":"0"}");
Serial.println("{"chedo":"0"}");
myserial.println("{"quat":"1"}");
Serial.println("{"quat":"1"}");
myserial.flush();
delay(100);
}
else if(quat==0 && trang_thai_quat==1)
{
myserial.println("{"chedo":"0"}");
Serial.println("{"chedo":"0"}");
myserial.println("{"quat":"0"}");
Serial.println("{"quat":"0"}");
myserial.flush();
delay(100);
}
}
}
//////////////////////////////////////////
void loop() {
read_esp();
}
///////////////////////////////////////////////////
void read_esp(void)
{
// kiểm tra cổng RX có tín hiệu hay ko
while (myserial.available())
{
//đọc
char InChar = (char)myserial.read();
if(InChar !='n')
{
DataUart += InChar;
}
else
{
// xử lí Json
Serial.println(DataUart);
xulyjson(String(DataUart));
DataUart = "";
}
}
}
//////////////////////////////////////
void xulyjson(String Data)
{
const size_t capacity = JSON_OBJECT_SIZE(2) + 256;
DynamicJsonDocument JSON(capacity);
DeserializationError error = deserializeJson( JSON, Data);
if(error)
{
Serial.println("json loi");
return;
}
else
{
nhiet_do_nhan= (String)JSON["b"];
do_am_nhan= (String)JSON["a"];
cd_sang_nhan=(String)JSON["d"];
do_am_dat_nhan=(String)JSON["c"];
Datapump= (String)JSON["e"];
Dataled= (String)JSON["f"];
Dataquat= (String)JSON["g"];
BlynkEdgent.run();
float vau3,vau1,vau2,vau0;
vau3=cd_sang_nhan.toFloat();
vau1=nhiet_do_nhan.toFloat();
vau2= do_am_dat_nhan.toFloat();
vau0=do_am_nhan.toFloat();
trang_thai_bom= Datapump.toInt();
trang_thai_led= Dataled.toInt();
trang_thai_quat= Dataquat.toInt();
Blynk.virtualWrite(V4,trang_thai_bom);
Blynk.virtualWrite(V9,trang_thai_quat);
Blynk.virtualWrite(V6,trang_thai_led);
Blynk.virtualWrite(V3,vau3);
Blynk.virtualWrite(V2,vau2);
Blynk.virtualWrite(V1,vau1);
Blynk.virtualWrite(V0,vau0);
JSON.clear();
}
}
/////////////////////////////////////
void sendata(String(thamso1),String(thamso2),String(thamso3))
{
//
myserial.print("{"chedo":"");
myserial.print(thamso1);
myserial.print("", "T":"");
myserial.print(thamso2);
myserial.print("", "H":"");
myserial.print(thamso3);
myserial.println(""}");
}

More Related Content

Similar to code-nodemcu.docx

What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
SIGMATAX1
 
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docx
# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docx
mayank272369
 
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
Teddy Hsiung
 
ISCA Final Presentaiton - Compilations
ISCA Final Presentaiton -  CompilationsISCA Final Presentaiton -  Compilations
ISCA Final Presentaiton - Compilations
HSA Foundation
 
Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! 
aleks-f
 

Similar to code-nodemcu.docx (20)

What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
 
Circular queue
Circular queueCircular queue
Circular queue
 
Gps c
Gps cGps c
Gps c
 
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docx
# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docx
 
Codes
CodesCodes
Codes
 
The proj main.asm;; the_proj_main.asm;; created 231
The proj main.asm;; the_proj_main.asm;; created 231The proj main.asm;; the_proj_main.asm;; created 231
The proj main.asm;; the_proj_main.asm;; created 231
 
Embedded JavaScript
Embedded JavaScriptEmbedded JavaScript
Embedded JavaScript
 
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
RISC-V : Berkeley Boot Loader & Proxy Kernelのソースコード解析
 
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
 
rrxv6 Build a Riscv xv6 Kernel in Rust.pdf
rrxv6 Build a Riscv xv6 Kernel in Rust.pdfrrxv6 Build a Riscv xv6 Kernel in Rust.pdf
rrxv6 Build a Riscv xv6 Kernel in Rust.pdf
 
PIC and LCD
PIC and LCDPIC and LCD
PIC and LCD
 
Gaztea Tech Robotica 2016
Gaztea Tech Robotica 2016Gaztea Tech Robotica 2016
Gaztea Tech Robotica 2016
 
ISCA Final Presentaiton - Compilations
ISCA Final Presentaiton -  CompilationsISCA Final Presentaiton -  Compilations
ISCA Final Presentaiton - Compilations
 
Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! 
 
JAVASCRIPT PROGRAM.pdf
JAVASCRIPT PROGRAM.pdfJAVASCRIPT PROGRAM.pdf
JAVASCRIPT PROGRAM.pdf
 
DataTypes.ppt
DataTypes.pptDataTypes.ppt
DataTypes.ppt
 
Config interface
Config interfaceConfig interface
Config interface
 
An Example MIPS
An Example  MIPSAn Example  MIPS
An Example MIPS
 
Tdm to vo ip 2
Tdm to vo ip 2Tdm to vo ip 2
Tdm to vo ip 2
 
Hello I hope you are doing well Would you be able to combi.pdf
Hello I hope you are doing well Would you be able to combi.pdfHello I hope you are doing well Would you be able to combi.pdf
Hello I hope you are doing well Would you be able to combi.pdf
 

Recently uploaded

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Recently uploaded (20)

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 

code-nodemcu.docx

  • 1. #include <ArduinoJson.h> #include <SoftwareSerial.h> #define BLYNK_TEMPLATE_ID "TMPLCKaGjlz5" #define BLYNK_DEVICE_NAME "IOT" #define BLYNK_FIRMWARE_VERSION "0.1.0" #define BLYNK_PRINT Serial //#define BLYNK_DEBUG #define APP_DEBUG #include "BlynkEdgent.h" const byte Rx= 12; const byte Tx =14; SoftwareSerial myserial=SoftwareSerial(Rx,Tx); //Rx-Tx void sendata(String(thamso1),String(thamso2),String(thamso3)); void control_pump(void); void read_esp(void); void xulyjson(String Data); void send_lenh(void); String nhiet_do_nhan=""; String do_am_nhan=""; String cd_sang_nhan=""; String do_am_dat_nhan=""; String DataUart=""; String DataSend= ""; String Datapump=""; String Dataled= ""; String Dataquat= ""; int trang_thai_bom; int trang_thai_led; int trang_thai_quat; int led; int pump1; int quat;
  • 2. int nhiet_do_set; int do_am_dat_set; long t = 0; int che_do; ///////////////////////////////////////// void setup() { myserial.begin(9600);// 8-8,7-9 Serial.begin(9600); delay(100); BlynkEdgent.begin(); t= millis(); Blynk.syncAll(); BLYNK_CONNECTED (); } BLYNK_WRITE(V4) { pump1 = param.asInt(); if(che_do==0) { if(pump1==1 && trang_thai_bom==0) { myserial.println("{"chedo":"0"}"); Serial.println("{"chedo":"0"}"); myserial.println("{"pump":"1"}"); Serial.println("{"pump":"1"}"); myserial.flush(); delay(100); } else if(pump1==0 && trang_thai_bom==1) {
  • 3. myserial.println("{"chedo":"0"}"); Serial.println("{"chedo":"0"}"); myserial.println("{"pump":"0"}"); Serial.println("{"pump":"0"}"); myserial.flush(); delay(100); } } } BLYNK_WRITE(V5) { nhiet_do_set = param.asInt(); delay(100); if(che_do==1) { sendata(String (che_do), String(nhiet_do_set),String (do_am_dat_set)); } } BLYNK_WRITE(V6) { led = param.asInt(); if(che_do==0) { if(led==1 && trang_thai_led==0) { myserial.println("{"led":"1"}"); Serial.println("{"led":"1"}"); myserial.flush(); delay(100); } else if(led==0 && trang_thai_led==1) {
  • 4. myserial.println("{"led":"0"}"); Serial.println("{"led":"0"}"); myserial.flush(); delay(100); } } } BLYNK_WRITE(V7) { che_do= param.asInt(); sendata(String (che_do), String(nhiet_do_set),String (do_am_dat_set)); } BLYNK_WRITE(V8) { do_am_dat_set = param.asInt(); delay(100); if(che_do==1) { sendata(String (che_do), String(nhiet_do_set),String (do_am_dat_set)); } } BLYNK_WRITE(V9) { quat = param.asInt(); if(che_do==0) { if(quat==1 && trang_thai_quat==0) { myserial.println("{"chedo":"0"}"); Serial.println("{"chedo":"0"}"); myserial.println("{"quat":"1"}");
  • 5. Serial.println("{"quat":"1"}"); myserial.flush(); delay(100); } else if(quat==0 && trang_thai_quat==1) { myserial.println("{"chedo":"0"}"); Serial.println("{"chedo":"0"}"); myserial.println("{"quat":"0"}"); Serial.println("{"quat":"0"}"); myserial.flush(); delay(100); } } } ////////////////////////////////////////// void loop() { read_esp(); } /////////////////////////////////////////////////// void read_esp(void) { // kiểm tra cổng RX có tín hiệu hay ko while (myserial.available()) { //đọc char InChar = (char)myserial.read();
  • 6. if(InChar !='n') { DataUart += InChar; } else { // xử lí Json Serial.println(DataUart); xulyjson(String(DataUart)); DataUart = ""; } } } ////////////////////////////////////// void xulyjson(String Data) { const size_t capacity = JSON_OBJECT_SIZE(2) + 256; DynamicJsonDocument JSON(capacity); DeserializationError error = deserializeJson( JSON, Data); if(error) { Serial.println("json loi"); return; } else { nhiet_do_nhan= (String)JSON["b"]; do_am_nhan= (String)JSON["a"]; cd_sang_nhan=(String)JSON["d"]; do_am_dat_nhan=(String)JSON["c"]; Datapump= (String)JSON["e"];
  • 7. Dataled= (String)JSON["f"]; Dataquat= (String)JSON["g"]; BlynkEdgent.run(); float vau3,vau1,vau2,vau0; vau3=cd_sang_nhan.toFloat(); vau1=nhiet_do_nhan.toFloat(); vau2= do_am_dat_nhan.toFloat(); vau0=do_am_nhan.toFloat(); trang_thai_bom= Datapump.toInt(); trang_thai_led= Dataled.toInt(); trang_thai_quat= Dataquat.toInt(); Blynk.virtualWrite(V4,trang_thai_bom); Blynk.virtualWrite(V9,trang_thai_quat); Blynk.virtualWrite(V6,trang_thai_led); Blynk.virtualWrite(V3,vau3); Blynk.virtualWrite(V2,vau2); Blynk.virtualWrite(V1,vau1); Blynk.virtualWrite(V0,vau0); JSON.clear(); } } ///////////////////////////////////// void sendata(String(thamso1),String(thamso2),String(thamso3)) { // myserial.print("{"chedo":""); myserial.print(thamso1); myserial.print("", "T":""); myserial.print(thamso2); myserial.print("", "H":""); myserial.print(thamso3);