Portal Gun- Power Bank and Diagram help

Hi. I am new at Arduino so please explain as simply as possible.
I am using this arduino guide as a reference for my own project. Portal Gun Arduino

In the guide, they have a song button, two light up arcade buttons, and are using a Neopixel flora.

I would like to change the arcade buttons for simple push buttons, remove the song button and add a third light option button, and change out the neopixel flora for another addressable RGB LED.

I am also using a different power bank than recommended, and am unsure if it will change anything at all or cause issues.

I do not know how to wire the third button to the Arduino Nano (if it can be), and I just want the rest of my diagram checked to make sure it will work and not overheat/ explode on me.

All the parts I am buying
Arduino Nano - Already have, do not have link for.
Red Diffused LED Diodes - Already have, do not have link for.
16 LED Ring for front Barrel - V: DC 5V, Power: 0.3W/PCS
LED Pixels - 5V 20 W
Micro USB Breakout Module - 5V
Digital Amplifier board- 5 V
Speakers 40 Ohm, 3 W
Soundboard -

Power Bank - 36800mAh (Chose this one instead of recommended, due to recommended being sold out and pricier. )

The FIRST RULE of reverse engineering it first get the original to work as designed, THEN begin to make changes.

Hi, @cosplayinghelp

Big job for a beginner?

Do you understand how the existing code works?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

It is, yes.

For the most part, yes. Original Code

If I am understanding this correctly, Lines 159-180 `

// Fire Blue
  if (BlueBtn == 0 && Power == true && Firing == false) {
    Firing = true;
    Portal = true;
    playAudio(bluefire, playing);
    setLightsState(1); //set light to blue

  } else {
    if (CancelBtn == 1 && BlueBtn == 1 && OrangeBtn == 1 && Firing == true)
      Firing = false;
  }

  // Fire Orange
  if (OrangeBtn == 0 && Power == true && Firing == false) {
    Firing = true;
    Portal = true;
    playAudio(orangefire, playing);
    setLightsState(0); //set lights to orange

  } else {
    if (CancelBtn == 1 && BlueBtn == 1 && OrangeBtn == 1 && Firing == true)
      Firing = false;
  }
`

Say if I was doing blue, it is if blue is on, the firing sound for blue will play if you press the button again.

If I was to add a white after initializing it, it would be

// White
  if (WhiteBtn == 0 && Power == true && Firing == false) {
    Firing = true;
    Portal = true;
    playAudio(whitecrackle, playing);
    setLightsState(3); //set light to white

  } else {
    if (CancelBtn == 1 && BlueBtn == 1 && OrangeBtn == 1 && WhiteBtn == 1 && Firing == true)
      Firing = false;
  

I would remove lines 61 and 114- 125 in order to remove the song button's creation.

Is this correct?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.