Serial1Event Not working
Posted: Mon Feb 07, 2022 11:48 pm
Hello,
Environment Win10, STM32F411 Black Pill, IDE 2 RC3 and IDE 1.8.16
Does Serial1event work please?
As i have just spent three hours at it, reading post, github etc and no way can i get it to work.
So just wondering has it not been implemented and i am wasting my time, or is there a working example please?
Code is below, using default pins PA9 and PA10 with wire link as loop back, send ok but no serial1event to trigger loop message send
Many thanks IMK
#include <arduino.h>
#include <stdlib.h>
#include <stdint.h>
#include <HardwareSerial.h>
int RxStringComplete = 0;
void setup()
{
Serial1.begin( 38400 );
Serial1.print( "Test" );
}
void loop()
{
if( RxStringComplete ) // See if we have received a message
{
delay( 100 );
Serial1.print( "REPLY" );
Serial1.println( );
RxStringComplete = 0;
}
delay(1);
}
void serial1Event()
{
RxStringComplete = 1;
}
Environment Win10, STM32F411 Black Pill, IDE 2 RC3 and IDE 1.8.16
Does Serial1event work please?
As i have just spent three hours at it, reading post, github etc and no way can i get it to work.
So just wondering has it not been implemented and i am wasting my time, or is there a working example please?
Code is below, using default pins PA9 and PA10 with wire link as loop back, send ok but no serial1event to trigger loop message send
Many thanks IMK
#include <arduino.h>
#include <stdlib.h>
#include <stdint.h>
#include <HardwareSerial.h>
int RxStringComplete = 0;
void setup()
{
Serial1.begin( 38400 );
Serial1.print( "Test" );
}
void loop()
{
if( RxStringComplete ) // See if we have received a message
{
delay( 100 );
Serial1.print( "REPLY" );
Serial1.println( );
RxStringComplete = 0;
}
delay(1);
}
void serial1Event()
{
RxStringComplete = 1;
}