fixed int to int16_t for 32-bit Arduino compatibility