converting to Arduino library