Hello,
Many thanks for this useful work.
When playing with it, I came up with strange behavior when using set_track_index() (wrong track was being played) and set_volume() (behavior not consistent).
It turns out that the _write_num() function does not work properly with some values such as 30 (that results into '3' being sent instead of '3', '0' ).
Hence I propose the following fix, that introduces a num0 variable that keeps the original value of 'num' :
void Mp3PlayerModuleWire::_write_num(uint16_t num)
{
int num0 = num;
for (uint16_t i = 10000; i > 0; i /= 10)
{
if (num0>= i)
{
_write_byte(num / i);
num %= i;
}
}
}
HTH