Go Down

Topic: Serial Header and Footer? (Read 2729 times) previous topic - next topic


I'm using Vixen, a program that I exporting serial output to arduino, but sometimes gets messed up. I've been told I need A header and footer and can do tht in vixen, but don't know how to incorporate that into my sketch. Here's the link to the sketc I'm using, all I've done is increased the channel amount and pins and all but it's the same principal. Any help is widely appreciated. I just need to know how I can add the header and footer into te sketch so that arduino can still read the serial data


I'm afraid you are going to have to provide much more and detailed information then that. What is a header and footer? What information needs to be put into them?



Here's the link to the sketc I'm using

Seems like you forgot something.
The art of getting good answers lies in asking good questions.


*facepalm* sorry I might've foud what I need, with a forum post, but I just need arduino to be able to read the header a d footer to not get lost in te serial buffer


I just added In my void loop a

char *header="VIXEN_START"
char *footer="VIXEN_END"

Maybe it will work.


I kind of doubt that adding two initialised variables to your sketch will make any difference at all, assuming you fix the syntax so it compiles.

If I understood you correctly you have a program ("Vixen"?) on a PC which is sending serial data to an Arduino and you have configured Vixen to put some recogniseable strings at the start and end of each message. That would certainly make it easier for your Arduino to detect the boundaries of each message accurately. In this case your sketch would need to receive the character stream from Vixen and detect the start-of-message and end-of-message character sequences. It would use these to determine whether it was receiving a message, and whether the message was complete. Presumably you would want to buffer the content of the message until it was complete and then process it.


That's exactly what I though I needed. Decided to try to increase baud rate on both things, and what do you know, it worked. I don't know why but thank for you help anyways. That's exactly what I needed, but it is working now.

Go Up