Changed int to int16_t for 32 bit Arduino

Not yet verified on Due