Replies: 2 comments 10 replies
|
USe void setup() {
Serial1.begin(115200);
pinMode(PA0, OUTPUT);
digitalWrite(PA0, HIGH);
}
void loop() {
digitalWrite(PA0, LOW);
Serial1.println("12345678");
Serial1.flush();
digitalWrite(PA0, HIGH);
}For ref: https://www.arduino.cc/reference/tr/language/functions/communication/serial/flush/ |
0 replies
|
I don't want to use delay because I want to use a non-blocking way to run the function, for example, I have a baud rate of 9600 and now I want to send 50 frames of data and it takes about 60ms. I don't want my code stuck here, is there any other way? |
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I used the following code
But the
delay()function must be added if it doesn't seem to work properlyLike this
Is there a way to do this without adding a delay function
All reactions