GY-63_MS5611/libraries/Adler/examples/Adler_test/Adler_test.ino
2022-06-14 15:28:07 +02:00

47 lines
777 B
C++

//
// FILE: Adler_test.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
#include "Arduino.h"
#include "Adler.h"
// expected output
// ADLER32_LIB_VERSION: 0.1.2
// 5C801F0
// 81E0256
// E000325
// 11E60398
char str1[24] = "abcde";
char str2[24] = "abcdef";
char str3[24] = "abcdefgh";
char str4[24] = "Wikipedia"; // example from Wikipedia page.
void setup()
{
Serial.begin(115200);
while (!Serial);
Serial.println();
Serial.print("ADLER32_LIB_VERSION: ");
Serial.println(ADLER32_LIB_VERSION);
Serial.println(adler32((uint8_t *) str1, 5), HEX);
Serial.println(adler32((uint8_t *) str2, 6), HEX);
Serial.println(adler32((uint8_t *) str3, 8), HEX);
Serial.println(adler32((uint8_t *) str4, 9), HEX);
}
void loop()
{
}
// -- END OF FILE --