#include "UniqueNumber.h"
// Use 8-bit Data type for 8-bit MCU's like ATmega328
using DataType = uint8_t;
// Use 32-bit data type for 8-bit MCU's like EPS8266 / ESP32
// using DataType = uint32_t;
const size_t maximumNumber = 99;
UniqueNumber<DataType, maximumNumber> uniqueNumber;
void setup() {
Serial.begin(115200);
Serial.print("Generating ");
Serial.print(maximumNumber);
Serial.println(" unique random numbers:");
while (uniqueNumber.available()) {
Serial.println(uniqueNumber.generateRandomNumber());
}
Serial.print("UniqueNumber<DataType, maximumNumber> needs ");
Serial.print(sizeof(UniqueNumber<DataType, maximumNumber>));
Serial.print(" bytes of RAM.");
}
void loop() {
}