I need to create a checksum to send with my data over my wireless link. I have three to five string variables to send. I will not know the length of the strings as they will always be changing. Can I just add the strings and save the result as a word or byte? For example;
spd var byte
deg var byte
alt var byte
cs var word
‘serin2 my data as string variables
cs = spd + deg + alt
serout2 Pinout,baudout,["$A,",str spd,",",str deg,",",str alt,"*",cs,"*",13,10]
Will this work? If anyone has the knowledge to do this please help. If I'm way off base please let me know. This checksum thing has got me stumped. I’m new to programming and don’t know how to proceed.
Thanks,
Mark
Bookmarks