Go Down

Topic: How to use the UART ? (Read 655 times) previous topic - next topic

elegance

MY system is windows, and my board is arduino mega.
i want to use the uart3(TX3,RX3) to communicate with another component.

my code is:

int buf[]={FF FF 00 07 03 1E 00 02 00 02 D3};
void setup(){

Serial3.begin(500000);

}
void loop() {
Serial3.write(buf,11);
}


but its said"27: error: exponent has no digits".

What can i do? I am a beginner, and I need the help of yours. Thanks!

PaulS

You can stick with one post asking a question. Asking more than once will not get more answers.

elegance


retrolefty

Your array is pretty messed up for one thing:

int buf[]={FF FF 00 07 03 1E 00 02 00 02 D3};

It needs commas between all the values and if those are HEX byte values then each needs to be in the form of 0xFF, 0xFF, etc.

Lefty

Go Up