Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2631
    Anonymous
    Inactive

    This might be my mistake but I couldn’t find clear documentation on the setVolume command. I understood (x,xx) should be the value given to it and (0, 0) is the loudest but what is the range of this value?

    Maybe someone can refer me to a page that explains everything about this command?

    Also, is there an easy way to serial print the volume values on the serial monitor as a way of receiving feedback? I’m sure you’ll hear the difference in loudness of the music but I’d like to also serial print this to double check.

    Thanks in advance!

    ~ Falx

    #2650

    Please refer to Volume Library it will explain the volume.

    Most coding knows what the value sent are so they don’t need to read it. Where below is likely the simplest way to read it and print it.


    twobyte mp3_vol;
    mp3_vol.word = MP3player.getVolume();
    Serial.print(F("Right Volume = "));
    Serial.println(mp3_vol.byte[0]);
    Serial.print(F("Left Volume = "));
    Serial.println(mp3_vol.byte[1]);

    Note that the union for twobyte is already defined in the library.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.