user76822: So I have the following connected and the programming works fine when connect by USB
The Parts

1 Arduino UNO
1 Laser Module (KEYS)
1 Rocker Switch Module (Standard 3 PIN)
2 Variation Motors (KEYS)
1 Speaker Module (BIG SPEAKER MODULE)
2 Push Button Modules (Standard 3 PIN)
1 SD Card Reader Module (Generic)
1 3V 1800 amh Battery

The Problem 1
I want to make an On/Off Switch but it doesn't work.
Battery Powers The Arduino Like This: (WORKS)
https://postimg.cc/JHmTwFKc
Battery Powers The Arduino Like This: (NOT WORKING)
https://postimg.cc/V0RKzFVy
PROBLEM 1: Why doesn't this work when it does for the Nano I have here:
https://postimg.cc/SnXHfwPJ
Secondly Here are some pictures of the setup I have
Battery - Rocker
https://postimg.cc/KK6qfjMW
Rocker - Arduino
https://postimg.cc/hXH6y2FM
https://postimg.cc/4HJrvnCg
Wide View Of Project
https://postimg.cc/3WY5Qfkc
The Problem 2
I need advice on what size battery to use the project for 1-2 hours I think I need (5v,7v,9v) but would like some help with which would be best suited or any suggestions you have
What I think it is but need help

The Wiring is wrong (but I have tested it all and its working fine)
The Rocker Module is passing 3V to the UNO (Not enough Power)
The Battery is not powerful enough (I need a bigger battery)
NOOB Problems as its my first project

What I need help with

What battery to use?
Making the On/Off switch work

Thanks for the HELP!!!
BONUS
Here is the code used:
    #include <pcmConfig.h>
    #include <pcmRF.h>
    #include <TMRpcm.h>
    
    #include <SPI.h>
    #include <SD.h>
    
    
    
    //SD card pin
    #define SD_ChipSelectPin 10
    //soundplayer object
    TMRpcm tmrpcm;
    
    
    int led = 13;
    //pin numbers
    int buttonpin = 3;
    int lazerpin = 4;
    int buttonpin2 = 5;
    int motorPin = 6;
    int motorPin2 = 7;
    
    //other values
    int t = 0;
    int val;
    int val2;
    int ammoUsed = 0;
    int prestate = 0;
    int prestate2 = 1;
    int canReload = 0;
    
    void setup()
    {
      //pin modes
      pinMode(led, OUTPUT);
      pinMode(lazerpin, OUTPUT);
      pinMode(buttonpin, INPUT);
      pinMode(buttonpin2, INPUT);
      pinMode(motorPin, OUTPUT);
      pinMode(motorPin2, OUTPUT);
    
      Serial.begin(9600);
      if (!SD.begin(SD_ChipSelectPin))
      {
        return;
      }
      else {
        //setup sound
        tmrpcm.speakerPin = 9;
        tmrpcm.quality(1);
        tmrpcm.setVolume(5);
        //play setup sound (user knows the gun is ready)
        playSound(0);
        tmrpcm.disable();
        tmrpcm.stopPlayback();
      }
    }
    
    //method to call sounds depending on the input
    void playSound(int t) {
      tmrpcm.disable();
      tmrpcm.stopPlayback();
    
      if (t == 0) {
        tmrpcm.setVolume(5);
        tmrpcm.play("0.wav");
        delay(2980); //time of clip
      }
      else if (t == 1) {
        tmrpcm.setVolume(6);
        tmrpcm.play("1.wav");
        delay(660); //time of clip
      }
      else if (t == 2) {
        tmrpcm.setVolume(5);
        tmrpcm.play("2.wav");
        delay(950); //time of clip
      }
      else if (t == 3) {
        tmrpcm.setVolume(6);
        tmrpcm.play("3.wav");
        delay(620); //time of clip
      }
      else if (t == 4) {
        tmrpcm.setVolume(5);
        tmrpcm.play("4.wav");
        delay(660); //time of clip
      }
    
      tmrpcm.disable();
      tmrpcm.stopPlayback();
    
      return;
    }
    void loop()
    {
      val = digitalRead(buttonpin); // check the state of the button
      val2 = digitalRead(buttonpin2); // check the state of the button
    
      //reload gun
      if (val2 == HIGH && prestate2 == 0 && canReload == 1)
      {
        //reset ammo and play sound with vibrate
        ammoUsed = 0;
        canReload = 0;
        digitalWrite(motorPin, HIGH); //vibrate
        digitalWrite(motorPin2, HIGH); //vibrate
        playSound(3);
        digitalWrite(motorPin, LOW);  //stop vibrating
        digitalWrite(motorPin2, LOW);  //stop vibrating
        prestate2 = 1;
    
      }
      else if (val2 == LOW)
      {
        //reload let go
        prestate2 = 0;
      }
    
    
      //Shooting the gun 1-4 normal. 5 is louder and longer.
      if (val == LOW) // if button is pressed, turn LED on
      {
        digitalWrite(lazerpin, LOW);
        digitalWrite(led, LOW);
        prestate = 0;
      }
      else if (val == HIGH && prestate == 0)
      {
        if (ammoUsed != 5)
        {
          ammoUsed ++;
    
          if (ammoUsed > 0) {
            canReload = 1;
          }
          else {
            canReload = 0;
          }
    
    
          //turn on lazer and virbate
          digitalWrite(lazerpin, HIGH);
          digitalWrite(led, HIGH);
          digitalWrite(motorPin, HIGH); //vibrate
          digitalWrite(motorPin2, HIGH); //vibrate
    
          //play sound
          if (ammoUsed == 5) {
            playSound(2);
          }
          else {
            playSound(1);
          }
          //after sound lazer and vibrate turn off
          digitalWrite(motorPin, LOW);  //stop vibrating
          digitalWrite(motorPin2, LOW);  //stop vibrating
          digitalWrite(lazerpin, LOW);
          digitalWrite(led, LOW);
    
          prestate = 1;
        }
        else {
          //no ammo just vibrate and play sound with no lazer
          digitalWrite(motorPin, HIGH); //vibrate
          digitalWrite(motorPin2, HIGH); //vibrate
          playSound(4);
          canReload = 1;
          digitalWrite(motorPin, LOW);  //stop vibrating
          digitalWrite(motorPin2, LOW);  //stop vibrating
          prestate = 1;
    
        }
      }
    
    }


user76822: So here is the deal (I Kinda Solved It) so I took apart a 9V battery pack with a flip switch in it..... soldered some wired to it and now it works perfectly...... haha
but I would still like the know the reason why the rocker switch module doesn't work.
the only thing I can think of is the Voltage or Amp passed from the Switch Module isn't enough to power the board (as I tried 3 different rocker switches and all acted the same)
Thanks for the help

76822: <p><em>So I have the following connected and the programming works fine when connect by USB</em></p>
<p><strong>The Parts</strong></p>
<ul>
<li>1 Arduino UNO</li>
<li>1 Laser Module (KEYS)</li>
<li>1 Rocker Switch Module (Standard 3 PIN)</li>
<li>2 Variation Motors (KEYS)</li>
<li>1 Speaker Module (BIG SPEAKER MODULE)</li>
<li>2 Push Button Modules (Standard 3 PIN)</li>
<li>1 SD Card Reader Module (Generic)</li>
<li>1 3V 1800 amh Battery</li>
</ul>
<p><strong>The Problem 1</strong>
<em>I want to make an On/Off Switch but it doesn't work.</em></p>
<p>Battery Powers The Arduino Like This: (WORKS)</p>
<p><a href="https://postimg.cc/JHmTwFKc" rel="nofollow noreferrer">https://postimg.cc/JHmTwFKc</a></p>
<p>Battery Powers The Arduino Like This: (NOT WORKING)</p>
<p><a href="https://postimg.cc/V0RKzFVy" rel="nofollow noreferrer">https://postimg.cc/V0RKzFVy</a></p>
<p>PROBLEM 1: Why doesn't this work when it does for the Nano I have here:</p>
<p><a href="https://postimg.cc/SnXHfwPJ" rel="nofollow noreferrer">https://postimg.cc/SnXHfwPJ</a></p>
<p><em>Secondly Here are some pictures of the setup I have</em></p>
<p>Battery - Rocker</p>
<p><a href="https://postimg.cc/KK6qfjMW" rel="nofollow noreferrer">https://postimg.cc/KK6qfjMW</a></p>
<p>Rocker - Arduino</p>
<p><a href="https://postimg.cc/hXH6y2FM" rel="nofollow noreferrer">https://postimg.cc/hXH6y2FM</a></p>
<p><a href="https://postimg.cc/4HJrvnCg" rel="nofollow noreferrer">https://postimg.cc/4HJrvnCg</a></p>
<p>Wide View Of Project</p>
<p><a href="https://postimg.cc/3WY5Qfkc" rel="nofollow noreferrer">https://postimg.cc/3WY5Qfkc</a></p>
<p><strong>The Problem 2</strong>
<em>I need advice on what size battery to use the project for 1-2 hours I think I need (5v,7v,9v) but would like some help with which would be best suited or any suggestions you have</em></p>
<p><strong>What I think it is but need help</strong></p>
<ol>
<li>The Wiring is wrong (but I have tested it all and its working fine)</li>
<li>The Rocker Module is passing 3V to the UNO (Not enough Power)</li>
<li>The Battery is not powerful enough (I need a bigger battery)</li>
<li>NOOB Problems as its my first project</li>
</ol>
<p><strong>What I need help with</strong></p>
<ol>
<li>What battery to use?</li>
<li>Making the On/Off switch work</li>
</ol>
<p>Thanks for the HELP!!!</p>
<p><strong>BONUS</strong>
Here is the code used:</p>
<pre><code>    #include &lt;pcmConfig.h&gt;
    #include &lt;pcmRF.h&gt;
    #include &lt;TMRpcm.h&gt;
    
    #include &lt;SPI.h&gt;
    #include &lt;SD.h&gt;
    
    
    
    //SD card pin
    #define SD_ChipSelectPin 10
    //soundplayer object
    TMRpcm tmrpcm;
    
    
    int led = 13;
    //pin numbers
    int buttonpin = 3;
    int lazerpin = 4;
    int buttonpin2 = 5;
    int motorPin = 6;
    int motorPin2 = 7;
    
    //other values
    int t = 0;
    int val;
    int val2;
    int ammoUsed = 0;
    int prestate = 0;
    int prestate2 = 1;
    int canReload = 0;
    
    void setup()
    {
      //pin modes
      pinMode(led, OUTPUT);
      pinMode(lazerpin, OUTPUT);
      pinMode(buttonpin, INPUT);
      pinMode(buttonpin2, INPUT);
      pinMode(motorPin, OUTPUT);
      pinMode(motorPin2, OUTPUT);
    
      Serial.begin(9600);
      if (!SD.begin(SD_ChipSelectPin))
      {
        return;
      }
      else {
        //setup sound
        tmrpcm.speakerPin = 9;
        tmrpcm.quality(1);
        tmrpcm.setVolume(5);
        //play setup sound (user knows the gun is ready)
        playSound(0);
        tmrpcm.disable();
        tmrpcm.stopPlayback();
      }
    }
    
    //method to call sounds depending on the input
    void playSound(int t) {
      tmrpcm.disable();
      tmrpcm.stopPlayback();
    
      if (t == 0) {
        tmrpcm.setVolume(5);
        tmrpcm.play(&quot;0.wav&quot;);
        delay(2980); //time of clip
      }
      else if (t == 1) {
        tmrpcm.setVolume(6);
        tmrpcm.play(&quot;1.wav&quot;);
        delay(660); //time of clip
      }
      else if (t == 2) {
        tmrpcm.setVolume(5);
        tmrpcm.play(&quot;2.wav&quot;);
        delay(950); //time of clip
      }
      else if (t == 3) {
        tmrpcm.setVolume(6);
        tmrpcm.play(&quot;3.wav&quot;);
        delay(620); //time of clip
      }
      else if (t == 4) {
        tmrpcm.setVolume(5);
        tmrpcm.play(&quot;4.wav&quot;);
        delay(660); //time of clip
      }
    
      tmrpcm.disable();
      tmrpcm.stopPlayback();
    
      return;
    }
    void loop()
    {
      val = digitalRead(buttonpin); // check the state of the button
      val2 = digitalRead(buttonpin2); // check the state of the button
    
      //reload gun
      if (val2 == HIGH &amp;&amp; prestate2 == 0 &amp;&amp; canReload == 1)
      {
        //reset ammo and play sound with vibrate
        ammoUsed = 0;
        canReload = 0;
        digitalWrite(motorPin, HIGH); //vibrate
        digitalWrite(motorPin2, HIGH); //vibrate
        playSound(3);
        digitalWrite(motorPin, LOW);  //stop vibrating
        digitalWrite(motorPin2, LOW);  //stop vibrating
        prestate2 = 1;
    
      }
      else if (val2 == LOW)
      {
        //reload let go
        prestate2 = 0;
      }
    
    
      //Shooting the gun 1-4 normal. 5 is louder and longer.
      if (val == LOW) // if button is pressed, turn LED on
      {
        digitalWrite(lazerpin, LOW);
        digitalWrite(led, LOW);
        prestate = 0;
      }
      else if (val == HIGH &amp;&amp; prestate == 0)
      {
        if (ammoUsed != 5)
        {
          ammoUsed ++;
    
          if (ammoUsed &gt; 0) {
            canReload = 1;
          }
          else {
            canReload = 0;
          }
    
    
          //turn on lazer and virbate
          digitalWrite(lazerpin, HIGH);
          digitalWrite(led, HIGH);
          digitalWrite(motorPin, HIGH); //vibrate
          digitalWrite(motorPin2, HIGH); //vibrate
    
          //play sound
          if (ammoUsed == 5) {
            playSound(2);
          }
          else {
            playSound(1);
          }
          //after sound lazer and vibrate turn off
          digitalWrite(motorPin, LOW);  //stop vibrating
          digitalWrite(motorPin2, LOW);  //stop vibrating
          digitalWrite(lazerpin, LOW);
          digitalWrite(led, LOW);
    
          prestate = 1;
        }
        else {
          //no ammo just vibrate and play sound with no lazer
          digitalWrite(motorPin, HIGH); //vibrate
          digitalWrite(motorPin2, HIGH); //vibrate
          playSound(4);
          canReload = 1;
          digitalWrite(motorPin, LOW);  //stop vibrating
          digitalWrite(motorPin2, LOW);  //stop vibrating
          prestate = 1;
    
        }
      }
    
    }
</code></pre>
 76822: <p>So here is the deal (I Kinda Solved It) so I took apart a 9V battery pack with a flip switch in it..... soldered some wired to it and now it works perfectly...... haha</p>
<p>but I would still like the know the reason why the rocker switch module doesn't work.</p>
<p>the only thing I can think of is the Voltage or Amp passed from the Switch Module isn't enough to power the board (as I tried 3 different rocker switches and all acted the same)</p>
<p>Thanks for the help</p>
