Using serial.print to debug a library

The cpp file has no idea what a HardwareSerial is. You need to include the header file in the source file.