ESP32-Radio icon indicating copy to clipboard operation
ESP32-Radio copied to clipboard

expand IR remote to select MP3 file

Open Rainer-G opened this issue 7 years ago • 3 comments

now that the IR control is working perfectly, I thought about using a IR command to select a mp3 file similar to the tripleclick given by the rotary encoder. I found this working quite nice:

In analyzeCmd() I added this "mp3mode" command:

else if ( argument == "mp3mode" )                   // Change to mp3 TRACK mode
{
     enc_inactivity = 0;
     if ( enc_menu_mode == TRACK ) 
     {
        singleclick = true;                           // end MP3 mode
        sprintf ( reply, "MP3 file is selected!" );   // Reply command
     }   
    else if ( enc_menu_mode == VOLUME )
     { 
        tripleclick = true ;
        sprintf ( reply, "Select MP3 file!" );        // Reply command
     }   
  }

It will simulate a triple click and a single click to select a track for chk_enc() .

This will use volume up/down buttons to browse through the file list:

if ( ( argument.indexOf ( "volume" ) >= 0 ) &&
       ( enc_menu_mode == TRACK ) )
 {
        enc_inactivity = 0;                           // simulate encoder activity
        if ( ivalue > 0 )
           rotationcount = 1;
        else  
           rotationcount = -1;
     }       
        
  else if ( argument.indexOf ( "volume" ) >= 0 )      // Volume setting?

so it will only use one additional button.

Is this something to add to your excellent project ? Cheers, Rainer esp32 radio

Rainer-G avatar Aug 17 '18 14:08 Rainer-G

Good idea. I will add this to the project later.

Edzelf avatar Aug 18 '18 12:08 Edzelf

I have an IR problem. The transition occurs after the second press. If I press the volume button twice, the volume increases, then I press the button 1 once, then the volume increases , and press the button 1 for the second time, then the button 1 is pressed. Probably the buffer remembers the last button pressed. Help!. Worked with 3 consoles, the result is the same.

avulyanichev avatar Sep 14 '18 20:09 avulyanichev

I have a NX3224T028 display from Nextion do you have the TFT file for that display ?

Willy3D avatar Jan 19 '23 21:01 Willy3D