Issue controlling Flux Capacitor with IR remote

I have an UNO R3 board that is the basis for a replica Flux Capacitor project I am doing. This is my first time using an Arduino, and first time looking at C++. I'm only part way into my build, so I currently only have the UNO and DFPlayer working (no lights yet).

My issue is: when I press a button on the remote, nothing is happening. From the code, I know that a sound plays and then a light sequence will start up. The startup sound plays every single time the UNO powers up. Sometimes Button 7 and Button 9 will play a their respective sounds after startup, but none of the other buttons will work. After that initial play, Buttons 7 & 9 do not respond.

I have a 17-key remote that uses the NEC protocol. I have verified that the remote and sensor work via other sketches. These sketches also helped me find the button codes. When getting these codes, I also saw "Unknown" Protocol on the serial display.

This project is based off another, and the code used is mostly the original code. My only alterations were an attempt to update IRremote from version 2 to 3/4, and to remove a "Rainbow Mode" setting.

// Created by RadBench: youtube.com/radbenchyt
// Made for A flux Capacitor with a 10 light NanoLed strip
//Modified to Update IRremote from V2 to V3/4. Removed Rainbow Mode.


// DFPlayer Stuff
#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"


SoftwareSerial mySoftwareSerial(10, 11); // Declares Pin 10 as Serial Receive (RX), Declares Pin 11 as Serial Transmit (TX)
DFRobotDFPlayerMini myDFPlayer; // Call DFRobot library to create myDFPlayer object

void printDetail(uint8_t type, int value);


///////////////////////////////////////////////////////////////////////////////////////////


//IR

uint32_t Previous;
#include <IRremote.hpp> // Include the IRremote.hpp library

#define IR_RECEIVE_PIN 3 // initialize pin 3 as the receiver pin for IR Remote


//Remote

#define button_0 0x19
#define button_1 0x45
#define button_2 0x46
#define button_3 0x47
#define button_4 0x44
#define button_5 0x40
#define button_6 0x43
#define button_7 0x7
#define button_8 0x15
#define button_9 0x9
#define buttonStop 0x1C
#define volUp 0x5A
#define volDwn 0x8
#define btnUp 0x18
#define btnDown 0x52
#define powerButton 0xD




///////////////////////////////////////////////////////////////////////////////////////////

// LEDS

uint8_t hue = 0;

#include <FastLED.h>
#define NUM_LEDS 22


#define DATA_PIN 5
#define CLOCK_PIN 13
#define ledColor Yellow
int delaySpeed = 80;
const unsigned long eventInterval = 1000;
unsigned long previousTime = 0;

  int timeTravel;
  int smoothChase;
  int movieChase;
  int movieSpeed = 34.45;
  int movieChaseSimple;
  int thirtyChase;
  int radChase;
  int radChase2;

// This is an array of leds.  One item for each led in your strip.
CRGB leds[NUM_LEDS];




///////////////////////////////////////////////////////////////////////////////////////////


void setup() {


  // Single LED
  pinMode(12, OUTPUT);

  // DFPlayer Setup
  mySoftwareSerial.begin(9600);  // Start mySoftwareSerial communication @ 9600 baud
  Serial.begin(115200); // Initialize Serial Monitor Output @ 115200 baud

  Serial.println();
  Serial.println(F("DFRobot DFPlayer Mini Demo"));
  Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));

  if (!myDFPlayer.begin(mySoftwareSerial)) {  //Use softwareSerial to check communication with mp3.
    Serial.println(F("Unable to begin:"));
    Serial.println(F("1.Please recheck the connection!"));
    Serial.println(F("2.Please insert the SD card!"));
    while (true);
  }
  Serial.println(F("DFPlayer Mini online."));

  myDFPlayer.volume(15);  //Set Initial audio volume value: 0 NONE, 30 MAX
  
  // STARTUP SOUND AND CHASE
  myDFPlayer.play(2);  //Play sound 002-EngineStart.mp3
  delay(600);
  radChase2 = 1;

  // End DFPLayer Setup

  // IR setup
  Serial.begin(9600); // Initialize Serial Monitor Output @ 9600 baud
  IrReceiver.begin(IR_RECEIVE_PIN) //Start the receiver

  // LED Setup ///////////////////////////////////////////////////////

  ;FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);  // GRB ordering is typical
  FastLED.setMaxPowerInVoltsAndMilliamps(5, 500);
  FastLED.clear();

}

void loop() {

 
  while (!IrReceiver.isIdle());  // if not idle, wait till complete


  if (IrReceiver.decode()) { // Check to see if an IR code is received
    Serial.println (IrReceiver.decodedIRData.decodedRawData, HEX); // Displays the data results in HEX values

    if (IrReceiver.decodedIRData.command == 0xFFFFFFFF) {
      IrReceiver.decodedIRData.command = Previous;
    }
    switch (IrReceiver.decodedIRData.command) {
      // If the received IR Command= value is for Button 1
      case button_1:
      // time travel
        timeTravel = 1;
        smoothChase = 0;
        movieChase = 0;
        thirtyChase = 0;
        movieChaseSimple = 0;
        radChase = 0;
        radChase2 = 0;
        // set delay speed for time travel
        delaySpeed = 113;
        // play audio track 1
        myDFPlayer.playMp3Folder(1); //play specific mp3 in SD:/MP3/0004.mp3; File Name(0~65535)
        break;
        // If the received IR Command= value is for Power Button
      case powerButton:
        myDFPlayer.stop();
        timeTravel = 0;
        thirtyChase = 0;
        smoothChase = 0;
        movieChase = 0;
        movieChaseSimple = 0;
        radChase = 0;
        radChase2 = 0;
        FastLED.clear();
        FastLED.show();
        break;
        // If the received IR Command= value is for Button 9
      case button_9:
        // stop current audio and play audio track
        myDFPlayer.stop();
        myDFPlayer.playMp3Folder(6); //plays BTTF theme music
        break;
        // If the received IR Command= value is for Button 2
      case button_2:
      // smooth chase
      // stop current audio and play audio track
        myDFPlayer.stop();
        myDFPlayer.playMp3Folder(3);
        timeTravel = 0;
        smoothChase = 1;
        movieChase = 0;
        movieChaseSimple = 0;
        thirtyChase = 0;
        radChase = 0;
        radChase2 = 0;
        delaySpeed = 80;
        Serial.println("button_2 Pressed. smoothChase:");
        break;
        // If the received IR Command= value is for Button 3
      case button_3:
      // thirty fps
      // stop current audio and play audio track
        myDFPlayer.stop();
        myDFPlayer.playMp3Folder(4);
          //set movie speed
        movieSpeed = 33.33;
        // set loop
        timeTravel = 0;
        smoothChase = 0;
        movieChase = 0;
        movieChaseSimple = 0;
        thirtyChase = 1;
        radChase = 0;
        radChase2 = 0;
        Serial.println("button_3 Pressed. 30fps");
        break;
        // If the received IR Command= value is for Button 4
      case button_4:
       // 24 fps
       //imitating 6 leds from film
       // stop current audio and play audio track
        myDFPlayer.stop();
        myDFPlayer.playMp3Folder(5);
        //set movie speed
        movieSpeed = 22.97;
        // set loop
        timeTravel = 0;
        thirtyChase = 0;
        smoothChase = 0;
        movieChase = 1;
        movieChaseSimple = 0;
        radChase = 0;
        radChase2 = 0;
        Serial.println("button_4 Pressed. Movie Chase 24fps");
        break;
        // If the received IR Command= value is for Button 5
      case button_5:
        //24 fps simple
        // stop current audio and play audio track
        myDFPlayer.stop();
        myDFPlayer.playMp3Folder(3);
        //set movie speed
        movieSpeed = 34.45;
        // set loop
        timeTravel = 0;
        thirtyChase = 0;
        smoothChase = 0;
        movieChase = 0;
        movieChaseSimple = 1;
        radChase = 0;
        radChase2 = 0;
        Serial.println("button_5 Pressed. 24FPS simple");
        break;
        // If the received IR Command= value is for Button 6
      case button_6:
        //Rad Chase
        // stop current audio and play audio track
        myDFPlayer.stop();
        myDFPlayer.playMp3Folder(4);
        //set movie speed
        movieSpeed = 66.66;
        // set loop
        timeTravel = 0;
        thirtyChase = 0;
        smoothChase = 0;
        movieChase = 0;
        movieChaseSimple = 0;
        radChase = 1;
        radChase2 = 0;
        break;
        // If the received IR Command= value is for Button 7
      case button_7:
        //Rad Chase
        // stop current audio and play audio track
        myDFPlayer.stop();
        myDFPlayer.playMp3Folder(5);
        //set movie speed
        movieSpeed = 66.66;
        // set loop
        timeTravel = 0;
        thirtyChase = 0;
        smoothChase = 0;
        movieChase = 0;
        movieChaseSimple = 0;
        radChase = 0;
        radChase2 = 1;
        break;
        // button up pressed, decrease delay timers - LEDs go faster
       case btnUp:

         if (movieSpeed > 24) {
           movieSpeed = movieSpeed - 10;
         }
         if (delaySpeed > 20) {
          delaySpeed = delaySpeed - 20;
         }
         // Smaller increments for delay speeds under 20
         if (delaySpeed <= 20 && delaySpeed > 4) {
          delaySpeed = delaySpeed - 4;
         }
        
        Serial.println("BtnUp pressed");
        Serial.println(movieSpeed);
        break;
        // button down pressed increase delays - LEDs go slower
       case btnDown:

         if (movieSpeed < 200) {
           movieSpeed = movieSpeed + 10;
         }
         if (delaySpeed < 160) {
          delaySpeed = delaySpeed + 20;
         }
        
        Serial.println("BtnDown pressed");
        Serial.println(movieSpeed);
        break;
    }
    
    while (!IrReceiver.isIdle());  // if not idle, wait till complete
      IrReceiver.resume(); // next value
    
  }



  // ----------------- SMOOTH CHASE ------------------------

  if (smoothChase == 1) {
    timeTravel = 0;

//    delaySpeed = 80;
    delay(100);

    // Move LEDS
    for (int i = 0; i < 16; i = i + 1) {

      if(i - 6 >= 0) {
        leds[i - 6] = CHSV(32, 128, 20);
        leds[10] = CRGB::Black;
        leds[11] = CRGB::Black;
        leds[12] = CRGB::Black;
        leds[13] = CRGB::Black;
        leds[14] = CRGB::Black;
        leds[15] = CRGB::Black;
      }
      if(i - 5 >= 0) {
        leds[i - 5] = CHSV(32, 128, 40);
        leds[10] = CRGB::Black;
        leds[11] = CRGB::Black;
        leds[12] = CRGB::Black;
        leds[13] = CRGB::Black;
        leds[14] = CRGB::Black;
        leds[15] = CRGB::Black;
      }
      if(i - 4 >= 0) {
        leds[i - 4] = CHSV(32, 128, 70);
        leds[10] = CRGB::Black;
        leds[11] = CRGB::Black;
        leds[12] = CRGB::Black;
        leds[13] = CRGB::Black;
        leds[14] = CRGB::Black;
        leds[15] = CRGB::Black;
      }
      if(i - 3 >= 0) {
        leds[i - 3] = CHSV(32, 128, 180);
        leds[10] = CRGB::Black;
        leds[11] = CRGB::Black;
        leds[12] = CRGB::Black;
        leds[13] = CRGB::Black;
        leds[14] = CRGB::Black;
        leds[15] = CRGB::Black;
      }
      if(i - 2 >= 0) {
        leds[i - 2] = CHSV(32, 128, 70);
        leds[10] = CRGB::Black;
        leds[11] = CRGB::Black;
        leds[12] = CRGB::Black;
        leds[13] = CRGB::Black;
        leds[14] = CRGB::Black;
        leds[15] = CRGB::Black;
      }
      if(i - 1 >= 0) {
        leds[i - 1] = CHSV(32, 128, 40);
        leds[10] = CRGB::Black;
        leds[11] = CRGB::Black;
        leds[12] = CRGB::Black;
        leds[13] = CRGB::Black;
        leds[14] = CRGB::Black;
        leds[15] = CRGB::Black;
      }
        leds[i] = CHSV(32, 128, 20);
        leds[10] = CRGB::Black;
        leds[11] = CRGB::Black;
        leds[12] = CRGB::Black;
        leds[13] = CRGB::Black;
        leds[14] = CRGB::Black;
        leds[15] = CRGB::Black;
        

      // Show the leds

      FastLED.show();
      
      delay(delaySpeed);
      FastLED.clear();
      FastLED.show();
      smoothChase = 1;
      timeTravel = 0;




    }

    
  }

    // ----------------- MOVIE CHASE - imitates 6 LEDs - matches 24fps speed from the movie------------------------

  if (movieChase == 1) {
    timeTravel = 0;
    smoothChase = 0;


    // Move LEDS
    for (int i = 0; i < 5; i = i + 1) {

      // LED 1
      if(i = 0) {
        leds[0] = CHSV(22, 200, 100);
        leds[1] = CHSV(22, 200, 100);
        
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      // LED 2
      if(i = 1) {
        leds[1] = CHSV(22, 200, 100);
        leds[2] = CHSV(22, 200, 100);

        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      // LED 3
      if(i = 2) {
        leds[2] = CHSV(22, 200, 100);
        leds[3] = CHSV(22, 200, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      // LED 4
      if(i = 3) {
        leds[4] = CHSV(22, 200, 15);
        leds[5] = CHSV(22, 200, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      // LED 5
      if(i = 4) {
        leds[6] = CHSV(22, 200, 100);
        leds[7] = CHSV(22, 200, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      // LED 6
      if(i = 5) {
        leds[8] = CHSV(22, 200, 100);
        leds[9] = CHSV(22, 200, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
        
      movieChase = 1;
      smoothChase = 0;
      timeTravel = 0;
    }
    
  }

  // ----------------- RAD CHASE ------------------------

  if (radChase == 1) {




    // Move LEDS
    for (int i = 0; i < 6; i = i + 1) {

      if(i = 1) {
        leds[0] = CHSV(28, 120, 100);
        leds[1] = CHSV(28, 120, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      if(i = 2) {
        leds[2] = CHSV(28, 120, 100);
        leds[3] = CHSV(28, 120, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      if(i = 3) {
        leds[4] = CHSV(28, 120, 100);
        leds[5] = CHSV(28, 120, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      if(i = 4) {
        leds[6] = CHSV(28, 120, 100);
        leds[7] = CHSV(28, 120, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      if(i = 5) {
        leds[8] = CHSV(28, 120, 100);
        leds[9] = CHSV(28, 120, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
        
      radChase = 1;

    }
    
  }


// ----------------- RAD CHASE 2------------------------

  if (radChase2 == 1) {




    // Move LEDS
    for (int i = 0; i < 10; i = i + 1) {

      if(i < 10) {
        leds[i] = CHSV(28, 200, 120);
        leds[i - 1] = CHSV(28, 200, 30);
        leds[i + 1] = CHSV(28, 200, 30);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
        
      radChase2 = 1;

    }
    
  }

  // ----------------- MOVIE CHASE SIMPLE ------------------------

  if (movieChaseSimple == 1) {

    


    // Move LEDS
    for (int i = 0; i < 5; i = i + 1) {

      if(i = 1) {
        leds[2] = CHSV(22, 200, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      if(i = 2) {
        leds[4] = CHSV(22, 200, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      if(i = 3) {
        leds[6] = CHSV(22, 200, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      if(i = 4) {
        leds[8] = CHSV(22, 200, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
        
      movieChaseSimple = 1;

    }
    
  }

   // ----------------- THIRTY FPS CHASE - For shooting at 30fps------------------------

  if (thirtyChase == 1) {

    // Move LEDS
    for (int i = 0; i < 5; i = i + 1) {

      if(i = 1) {
        leds[0] = CHSV(32, 128, 100);
        leds[1] = CHSV(32, 128, 100);
        leds[2] = CHSV(32, 128, 15);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      if(i = 2) {
        leds[2] = CHSV(32, 128, 15);
        leds[3] = CHSV(32, 128, 100);
        leds[4] = CHSV(32, 128, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      if(i = 3) {
        leds[5] = CHSV(32, 128, 100);
        leds[6] = CHSV(32, 128, 100);
        leds[7] = CHSV(32, 128, 15);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
      if(i = 4) {
        leds[7] = CHSV(32, 128, 15);
        leds[8] = CHSV(32, 128, 100);
        leds[9] = CHSV(32, 128, 100);
        FastLED.show();
        delay(movieSpeed);
        FastLED.clear();
      }
        
      thirtyChase = 1;

    }
    
  }


  // ----------------- TimeTravel ------------------------

  if (timeTravel == 1) {

    unsigned long currentTime = millis();


    // Move LEDS
    for (int i = 0; i < 20; i = i + 1) {

      if (i - 6 >= 0) {
        leds[i - 6] = CHSV(28, 150, 60);
      }
      if (i - 5 >= 0) {
        leds[i - 5] = CHSV(28, 150, 100);
      }
      if (i - 4 >= 0) {
        leds[i - 4] = CHSV(28, 150, 160);
      }
      if (i - 3 >= 0) {
        leds[i - 3] = CHSV(28, 150, 220);
      }
      if (i - 2 >= 0) {
        leds[i - 2] = CHSV(28, 150, 160);
      }
      if (i - 1 >= 0) {
        leds[i - 1] = CHSV(28, 150, 100);
      }
      leds[i] = CHSV(28, 200, 60);
      leds[10] = CRGB::Black;
      leds[11] = CRGB::Black;
      leds[12] = CRGB::Black;
      leds[13] = CRGB::Black;
      leds[14] = CRGB::Black;
      leds[15] = CRGB::Black;
      leds[16] = CRGB::Black;
      leds[17] = CRGB::Black;
      leds[18] = CRGB::Black;
      leds[19] = CRGB::Black;
      leds[20] = CRGB::Black;


      // Show the leds

      FastLED.show();

      FastLED.clear();
      timeTravel = 1;

      // Wait a little bit
      delay(delaySpeed);

    }

    // Reduce delay time so each sequence is faster than the last
    delaySpeed = delaySpeed * .837;

    if (delaySpeed < 1) {
      // leds[5] = CRGB::Black;

      previousTime = millis();

      
              if (millis() < previousTime + 4000) {
                // ZIIIP!  Moment of time travel
                
                digitalWrite(12, HIGH);
                for(int y = 0; y < 22; y++) {
                leds[y] = CRGB::Blue;
                FastLED.show();
                }
                
                delay(3300);
                FastLED.clear();
                FastLED.show();
//                for(int x = 0; x < 9; x++) {
//                leds[x] = CRGB::Black;
//                FastLED.show();
//                }
                // Single LED
                digitalWrite(12, LOW);
                // Delay after blue light
                delay(850);

      // First Burst
      for (int i = 0; i < 10; i++) {
        leds[i] = CHSV(28, 110, 120);
        leds[10] = CRGB::Blue;
        leds[11] = CRGB::Blue;
        leds[12] = CRGB::Blue;
        leds[13] = CRGB::Blue;
        leds[14] = CRGB::Blue;
        leds[15] = CRGB::Blue;
        leds[16] = CRGB::Blue;
        leds[17] = CRGB::Blue;
        leds[18] = CRGB::Blue;
        leds[19] = CRGB::Blue;
        leds[20] = CRGB::Blue;
        leds[21] = CRGB::Blue;
        
       FastLED.show();
      }
     
      // Single LED
      digitalWrite(12, HIGH);
      delay(300);
      FastLED.clear();
      FastLED.show();
      // Single LED
      digitalWrite(12, LOW);
      delay(400);

      // Second Burst
      for (int i = 0; i < 21; i++) {
        leds[i] = CHSV(28, 110, 120);
        leds[10] = CRGB::Blue;
        leds[11] = CRGB::Blue;
        leds[12] = CRGB::Blue;
        leds[13] = CRGB::Blue;
        leds[14] = CRGB::Blue;
        leds[15] = CRGB::Blue;
        leds[16] = CRGB::Blue;
        leds[17] = CRGB::Blue;
        leds[18] = CRGB::Blue;
        leds[19] = CRGB::Blue;
        leds[20] = CRGB::Blue;
        leds[21] = CRGB::Blue;
        FastLED.show();
      }
      // Single LED
      digitalWrite(12, HIGH);
      delay(1000);
      delaySpeed = 80;
      timeTravel = 0;
      smoothChase = 1;
      FastLED.clear();
      FastLED.show();
      // Single LED
      digitalWrite(12, LOW);
      //          chase();
      //          exit(0);
      //          reset();



              }

    }


  } 

  // ------------ END timeTravel --------------------

}

That semicolon belongs to the previous line of code.
Leo..

you have this many, many times throughout your code. That is an assignment, comparison is '=='

That would be the first thing to fix.

I checked the original unedited code for this project, and that semicolon wasn't there. Seems like my finger slipped.

I understand using comparison for the buttons and the different modes, but what is the benefit to using comparison for the LEDs? Is this a change that will make the code more efficient?

I know the light modes worked in the original build, the builder demonstrated them all in a video. I'm a bit hesitant to touch that part of the code, I'm not good with coding, and I don't want to mess up the most impressive aspect of this project: the light sequences.

You are assigning a value to i and not comparing it which changes what the code does.

As the code is now, its assigning: if(i = 1) {

The code should be like this (equal to): if(i == 1) {

I assume that code after if(i = 1) { is controlling the blink sequence and color of the LED lights. Why is using == is better for the LED lights? Am I wrong about what that part of the code does?

Could these numerous assignments in the code prevent the IRremote from responding? Did having to update the code from IRremote 2 to IRremote 4 cause the (previously working) code to break?

why do you keep asking the same question? if() statements use the comparison operator '==' to test for a condition and, if the condition is true, execute the code associated with that if() statement. It sounds like you might need to take a step back and spend some time learning C/C++ before tackling this project.

I asked my initial question because I am seeking guidance in trying to troubleshoot my remote. This was working code, with a working remote control. I want to get mine to work.

You're saying I should this change code at the end of my sketch, I have no issues with that. What I'm having trouble with understanding, is how changing that code helps with troubleshooting my remote problem. Is how it's currently written causing conflict with IRremote? If it is, please say so.

It doesn't make sense to me to change around code if I have no way to test it.

The most likely cause of your remote not working is that the FastLED library turns off interrupts while it is clocking the data out to the LEDS and the IR library uses interrupts to receive the bit stream.

As for the other code, it is still wrong, regardless of whether or not it is impacting the rest of your code.

Another example of wrong code that doesn't impact your receiver:

You start out at 115200 baud and then switch to 9600 baud. Depending on what baud your serial monitor is set at, you will miss either the first part or the later part.

You only need to start the Serial communication once.

Thank you for the first comment. :smiley: That gave me some direction for testing. You are 100% correct. I also made the changes you mentioned too.

I created a sketch where I took out all the FastLED code, and I can get all the buttons to work/play sounds/print output to serial.

I also tested with a few bits of code on the FastLED Git that are supposed to help with the interrupt issue

#define FASTLED_ALLOW_INTERRUPTS 0

#define FASTLED_INTERRUPT_RETRY_COUNT 1

I tried both of these (individually), and could get the buttons to respond for a short time before they stopped responding.

More testing.

I too am building a RadBench flux capacitor and getting the original sketch to work as shown in the YouTube video has been challenge. At first, nothing worked, but I read in the video comments that the most recent versions of the libraries may not be compatible. So, through a process of elimination, I got the LEDs, the IRremote and the DFPlayer working by trying different versions of the libraries. Here are the libraries that work for me:

IRremote is version 3.6.0
DFPlayerMini is version 1.0.3
FastLED is version 3.6.0

Another problem was getting the music/sound effects to occur with the correct LED effect. The SD card must have effects numbered (.0001 through .0006) and sorted by the date modified. The files must be in a folder titled MP3.

IRremote-LED Light Chase-Song/Effect Sound-File Name
Start Up (Power On)-Rad Speed (White)-EngineStart-.0002
Button 1-Time Travel-Delorean Time Travel-.0001
Button 2-Smooth Chase (10 Lights)-StartupShort (no beeps)-.0003
Button 3-Film Speed (White)-StartupLong (alarm beeps)-.0004
Button 4-Film Speed (Amber)-Startup 2 (low beeps)-.0005
Button 5-Rad Speed Amber Default Speed-StartupShort (no beeps)-.0003
Button 6-Rad Speed (White)-StartupLong (alarm beeps)-.0004
Button 7-Rad Speed (Amber)-Startup 2 (low beeps)-.0005
Button 8-Rainbow-Startup 2 (low beeps)-.0005
Button 9-N/A-BTTF Theme Song-.0006

Line 109 caused the wrong sound effect to play. Changed "myDFPlayer.play (2); //Play mp3" to "myDFPlayer.playMp3Folder (2); //Play mp3". It works now.

The only IRremote button that does not work fully is Button 1. LEDs work, but no sound effects.

After I figure out the button 1 problem, I plan on updating the sketch to work with the newer versions of the libraries. Hope this helps!

1 Like

Any new updates on this? I am building the same thing and I can't get button 1 to work correctly and I somehow cannot get the volume up and volume down buttons to work either. The pinout diagram that was provided did not have anything hooked up to the IO_1 (volume down) or IO_2 pins (volume up) on the DFPlayer module.

My situation: The mp3 file would not work through the flux player, but would work through my computer. The lights worked fine.

I used Audacity software to reformat the mp3 file. After doing that, it worked through the flux player.

My flux capacitor sounds and associated effects are now working.

Not sure about the volume, I haven’t tested it.

Hello man! I need your help!! Can you give me your mail?