I am using the following (Erel Tutorial) to access the second hardware serial on an ESP 32
It will not compile
In Arduino you have to define a hardware serial as
HardwareSerial Serial2(2); // Second Hardware Port
Is there something else that needs to be done in this snippet
#if C
void SerialNative2(B4R::Object* unused) {
::Serial2.begin(115200); //<--You can change the baud rate
b4r_main::_serialnative1->wrappedStream = &::Serial2;
}
#end if
It will not compile
In Arduino you have to define a hardware serial as
HardwareSerial Serial2(2); // Second Hardware Port
Is there something else that needs to be done in this snippet
#if C
void SerialNative2(B4R::Object* unused) {
::Serial2.begin(115200); //<--You can change the baud rate
b4r_main::_serialnative1->wrappedStream = &::Serial2;
}
#end if