'PUERTO SERIAL SIM800L
#if C
//Puerto Serial SIM800L
void SerialNative2(B4R::Object* unused)
{
::Serial2.begin(4800,SERIAL_8N1,26,27);
b4r_main::_serialnative2->wrappedStream = &::Serial2;
}
#End If
'PUERTO SERIAL MÓDULO SENSORES
'RX=2, TX=4
#if C
void SerialNative1(B4R::Object* unused){
::Serial1.begin(9600, SERIAL_8N1, 2, 4);
b4r_main::_serialnative1->wrappedStream = &::Serial1;
}
#End If
'**************************************************************************
Private Sub AppStart
'**********************************
'GESTIÓN PUERTO USB
Serial0.Initialize(115200)
astreamcom.Initialize(Serial0.Stream, "AstreamCom_NewData", "AstreamCom_Error")
'GESTION MODEM SIM800L
RunNative("SerialNative2", Null)
astream.Initialize(SerialNative2,"Astream_NewData", "Astream_Error")
'PUERTO SERIAL MÓDULO SENSORES
RunNative("SerialNative1", Null)
astream1.Initialize(SerialNative1,"AStream1_NewData", "Astream1_Error")
........