Closed luckwaski closed 7 years ago
I think, you are confusing some things.. "51" is a string with two chars (two Bytes - in decimal 53, 49) - this string is not in your Array. So, to get 0xC11D, your buffer should be :
uint8_t buf[] = {53, 49};
Serial.println( CRC16.ccitt(buf, 2), HEX );
But please understand, this is not the place to discuss programming problems.. its meant for issues / bugs in the library. Please ask in the forum: http://forum.pjrc.com
Frank.
Hello, I've got a little stuck with this library.
I have a buffer of:
to CRC but I'm having hard time getting proper results. Lets get [3] element from the array 0x33 which is 51. While this:
gave me correct result of 0xC11D i cant for the love of God make it out of my buffer. I've tried casting all the types back and forth - with whole bunch of different results but never the correct one: 0xC11D. Could you please advice?
Thank you