Wireless Arduino Shooting Game

1,365

14

8

34 years old, loves electric and build with arduino and raspberry

Intro: Wireless Arduino Shooting Game

This is an game i made for me to shoot at targets with CO2 guns. My other instructable is to my first version of this game, but with cable and hosting on an Arduino Uno.

This version is a little more bigger and is wireless and cable possible.
The goal with this project is to have an electronic game to shoot at targets. Three game types:

  1. Quickdraw
  2. Timed mode
  3. Rapid fire

It's about the same as my last one but this time it's hosted on an Arduino Mega and i have expand it to save highscore, possible to print result out of an terminal printer, and there is an bigger lcd display.

For updated info and source code to program your arduinos please visit: https://shootinggameblog.wordpress.com

Each targets has Arduino Nano to control the NRF24L01+ transmitter and the sensor to sense a hit.

Follow my guide step by step and you can have your own wireless shooting target game.

This is what you need to make the game:

  • 4 shooting targets
  • 1 Arduino Mega
  • 4 Arduino Nano
  • 2 10K Ohm resisto
  • 4 Piezo Elements
  • 4 Green, Red & Blue led
  • 5 nRF24L01+ Transmitter
  • 220 ohm resistors
  • 100 uF capacitor (for the transmitter)
  • 8 Schottky Diods 1N5817
  • 4 Zener Diods TZX5V1B-TAP
  • 4 1M Ohm Resistors
  • 4 Ceramic Capacitors 0.01 uF

Step 1: Making the Wireless Sensors

You can make the sensors either by placing them right on the target with all electronic inside. Or just the cable sensor version where you place an cable (3.5 mm phono) between the target and the transmitters. (this version i use now)

The sensors is loaded with target code, each sensor have unique numbers to listen to so they know when they will be activated. There is just one code needed. All you need to do is to change on top in the code DEFINE SENSOR1 to the specified sensor. The system is built for 4 targets.

The code is available on GitHub.

The piezo is used to feel the vibration on target. When the bullet hits the target, the vibration will inform arduino that an hit is made.

The wireless sensor have three leds (depending on how you build them. The red one is for to indicate that there is problem transmitting, the green one is for success transmitting, and the blue to inform you that target is activated.

When the game send out an signal, the arduino will go in an knock loop to wait for the piezo to inform the arduino that an hit is made. When the hit is made it will start sending back an special code to the main system that is waiting for the transmitter. Follow the electric sheets to make the sensor, and flash the arduino with the software.

Your target is then ready, and you can use cables also if you don't want wireless sometimes.

Step 2: Making the Main System

The main system i have build inside a water proof case.

  • It has 4 push buttons
  • Two rotary switchs
  • One power button
  • A battery holder
  • 4 phono contacts
  • 20x4 lcd display
  • Terminal printer
  • RTC module
  • SD Card module
  • 1 Transmitter

This is the main system that holds the game. You can use it with wireless or with cables. Follow the electric sheet to connect everything.

What it have is three game modes:

  • Quickdraw (Shoot as fast as you can on the right target)
  • Timed Mode (Shoot so much you can in 10, 20 or 30 sec)
  • Rapid Fire (Hit 6, 10, 20 or 32 targets on fastest time)

I have made it possible to run on 9v power and 9v battery.
The terminal printer is to print out the result for a game, it even store the high score on an SD card.
It's important to place an capacitor on 3.3v and ground on the transmitter or else you will get problems with transmitting due to powerlost. Also there is good to shield it with aluminum foil to protect it so the other electronic don't disturb the transmitter. (Don't forget to take some plastic foil first on it. I have written more about this on the blog page (link on top.)
Visit my blog page for get updated info on the game, and the source code to program your arduino.

Step 3: Use the Game

When you build everything there is just one more thing to do, play with it. And always wear protection when shooting.

When you startup the game, you will have to choose if you are going to use wireless or cable.

If you are going to use wireless, start the sensors first, and then the game.
After selecting the wireless mode, it will send an test signal to each sensor to confirm that they got connection.
What it does is that the main system will send out an code, each sensor have there own code. And when they get the right code they send another code back to confirm.

Now you can play, select game and start playing with the game switch and press start button.
There is an menu button also (by pressing the OK button) where you can setup options for game, see high score, set the clock and other stuff.

When a game is finish you get an option to print out the result for the game if you use the terminal printer.

If you are going to use the cable version, insert the 3.5 mm phono cables to the sensors and then in the main system.

And on the startup you choose the cable version.

Good luck and if you have any question write an comment or send me an mail.

Share

    Recommendations

    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge
    • Optics Contest

      Optics Contest
    • Audio Contest 2018

      Audio Contest 2018

    8 Discussions

    0
    None
    enzo4life

    4 months ago

    Hi Andreas,

    I'm trying to build ketchthis project. I'm in the testing phase and trying to upload the the sketch, but I get the following error. I have installed the lib. manually as per your instructions. Please help. Thanks in advance.

    Arduino: 1.6.11 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

    ShootingEnglish_Final:35: error: 'SdFatSoftSpi' does not name a type

    SdFatSoftSpi<SOFT_MISO_PIN, SOFT_MOSI_PIN, SOFT_SCK_PIN> SD;

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void setup()':

    ShootingEnglish_Final:336: error: 'SD' was not declared in this scope

    if (!SD.begin(SD_CHIP_SELECT_PIN)) {

    ^

    ShootingEnglish_Final:401: error: 'SD' was not declared in this scope

    if (SD.exists("rsset.txt")) {

    ^

    ShootingEnglish_Final:432: error: 'SD' was not declared in this scope

    if (SD.exists("htime.txt")) {

    ^

    ShootingEnglish_Final:482: error: 'SD' was not declared in this scope

    if (SD.exists("htime2.txt")) {

    ^

    ShootingEnglish_Final:532: error: 'SD' was not declared in this scope

    if (SD.exists("htime3.txt")) {

    ^

    ShootingEnglish_Final:582: error: 'SD' was not declared in this scope

    if (SD.exists("hqu.txt")) {

    ^

    ShootingEnglish_Final:676: error: 'SD' was not declared in this scope

    if (SD.exists("hrap.txt")) {

    ^

    ShootingEnglish_Final:724: error: 'SD' was not declared in this scope

    if (SD.exists("hrap1.txt")) {

    ^

    ShootingEnglish_Final:772: error: 'SD' was not declared in this scope

    if (SD.exists("hrap2.txt")) {

    ^

    ShootingEnglish_Final:820: error: 'SD' was not declared in this scope

    if (SD.exists("hrap3.txt")) {

    ^

    ShootingEnglish_Final:868: error: 'SD' was not declared in this scope

    if (SD.exists("s1.txt")) {

    ^

    ShootingEnglish_Final:880: error: 'SD' was not declared in this scope

    if (SD.exists("s2.txt")) {

    ^

    ShootingEnglish_Final:890: error: 'SD' was not declared in this scope

    if (SD.exists("s3.txt")) {

    ^

    ShootingEnglish_Final:900: error: 'SD' was not declared in this scope

    if (SD.exists("s4.txt")) {

    ^

    ShootingEnglish_Final:911: error: 'SD' was not declared in this scope

    if (SD.exists("tset.txt")) {

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void doTimedMode()':

    ShootingEnglish_Final:1617: error: 'SD' was not declared in this scope

    SD.remove("htime.txt");

    ^

    ShootingEnglish_Final:1634: error: 'SD' was not declared in this scope

    SD.remove("htime2.txt");

    ^

    ShootingEnglish_Final:1651: error: 'SD' was not declared in this scope

    SD.remove("htime3.txt");

    ^

    ShootingEnglish_Final:1673: error: 'SD' was not declared in this scope

    SD.remove("htime.txt");

    ^

    ShootingEnglish_Final:1690: error: 'SD' was not declared in this scope

    SD.remove("htime2.txt");

    ^

    ShootingEnglish_Final:1707: error: 'SD' was not declared in this scope

    SD.remove("htime3.txt");

    ^

    ShootingEnglish_Final:1729: error: 'SD' was not declared in this scope

    SD.remove("htime.txt");

    ^

    ShootingEnglish_Final:1746: error: 'SD' was not declared in this scope

    SD.remove("htime2.txt");

    ^

    ShootingEnglish_Final:1763: error: 'SD' was not declared in this scope

    SD.remove("htime3.txt");

    ^

    ShootingEnglish_Final:1786: error: 'SD' was not declared in this scope

    SD.remove("htime.txt");

    ^

    ShootingEnglish_Final:1803: error: 'SD' was not declared in this scope

    SD.remove("htime2.txt");

    ^

    ShootingEnglish_Final:1820: error: 'SD' was not declared in this scope

    SD.remove("htime3.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void doTimedModeW()':

    ShootingEnglish_Final:2319: error: 'SD' was not declared in this scope

    SD.remove("htime.txt");

    ^

    ShootingEnglish_Final:2336: error: 'SD' was not declared in this scope

    SD.remove("htime2.txt");

    ^

    ShootingEnglish_Final:2353: error: 'SD' was not declared in this scope

    SD.remove("htime3.txt");

    ^

    ShootingEnglish_Final:2375: error: 'SD' was not declared in this scope

    SD.remove("htime.txt");

    ^

    ShootingEnglish_Final:2392: error: 'SD' was not declared in this scope

    SD.remove("htime2.txt");

    ^

    ShootingEnglish_Final:2409: error: 'SD' was not declared in this scope

    SD.remove("htime3.txt");

    ^

    ShootingEnglish_Final:2431: error: 'SD' was not declared in this scope

    SD.remove("htime.txt");

    ^

    ShootingEnglish_Final:2448: error: 'SD' was not declared in this scope

    SD.remove("htime2.txt");

    ^

    ShootingEnglish_Final:2465: error: 'SD' was not declared in this scope

    SD.remove("htime3.txt");

    ^

    ShootingEnglish_Final:2488: error: 'SD' was not declared in this scope

    SD.remove("htime.txt");

    ^

    ShootingEnglish_Final:2505: error: 'SD' was not declared in this scope

    SD.remove("htime2.txt");

    ^

    ShootingEnglish_Final:2522: error: 'SD' was not declared in this scope

    SD.remove("htime3.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void doRapidFire()':

    ShootingEnglish_Final:2747: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:2763: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:2781: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:2797: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:2815: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:2831: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:2849: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:2865: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:2890: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:2906: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:2924: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:2940: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:2958: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:2974: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:2992: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:3008: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:3033: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:3049: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:3067: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:3083: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:3101: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:3117: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:3135: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:3151: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:3176: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:3192: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:3210: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:3226: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:3244: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:3260: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:3278: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:3294: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void doRapidFireW()':

    ShootingEnglish_Final:3816: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:3832: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:3850: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:3866: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:3884: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:3900: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:3918: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:3934: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:3959: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:3975: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:3993: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:4009: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:4027: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:4043: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:4061: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:4077: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:4102: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:4118: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:4136: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:4152: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:4170: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:4186: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:4204: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:4220: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:4245: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:4261: error: 'SD' was not declared in this scope

    SD.remove("hrap.txt");

    ^

    ShootingEnglish_Final:4279: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:4295: error: 'SD' was not declared in this scope

    SD.remove("hrap1.txt");

    ^

    ShootingEnglish_Final:4313: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:4329: error: 'SD' was not declared in this scope

    SD.remove("hrap2.txt");

    ^

    ShootingEnglish_Final:4347: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    ShootingEnglish_Final:4363: error: 'SD' was not declared in this scope

    SD.remove("hrap3.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void doQuickDraw()':

    ShootingEnglish_Final:4760: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:4805: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:4860: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:4905: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:4960: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:5005: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:5060: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:5105: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void doQuickDrawW()':

    ShootingEnglish_Final:5785: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:5830: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:5885: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:5930: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:5985: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:6030: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:6085: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    ShootingEnglish_Final:6130: error: 'SD' was not declared in this scope

    SD.remove("hqu.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void timeHigh()':

    ShootingEnglish_Final:6930: error: 'SD' was not declared in this scope

    hquickFil = SD.open("htime.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void rapidHigh()':

    ShootingEnglish_Final:7134: error: 'SD' was not declared in this scope

    hquickFil = SD.open("hrap.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void quickHigh()':

    ShootingEnglish_Final:7425: error: 'SD' was not declared in this scope

    hquickFil = SD.open("hqu.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void printRapid()':

    ShootingEnglish_Final:7608: error: 'gun2_width' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    ShootingEnglish_Final:7608: error: 'gun2_height' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    ShootingEnglish_Final:7608: error: 'gun2_data' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void printTimed()':

    ShootingEnglish_Final:7756: error: 'gun2_width' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    ShootingEnglish_Final:7756: error: 'gun2_height' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    ShootingEnglish_Final:7756: error: 'gun2_data' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void printQuick()':

    ShootingEnglish_Final:7910: error: 'gun2_width' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    ShootingEnglish_Final:7910: error: 'gun2_height' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    ShootingEnglish_Final:7910: error: 'gun2_data' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void printHigh()':

    ShootingEnglish_Final:8196: error: 'gun2_width' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    ShootingEnglish_Final:8196: error: 'gun2_height' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    ShootingEnglish_Final:8196: error: 'gun2_data' was not declared in this scope

    printer.printBitmap(gun2_width, gun2_height, gun2_data);

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void setRapidFire()':

    ShootingEnglish_Final:8681: error: 'SD' was not declared in this scope

    SD.remove("rsset.txt");

    ^

    ShootingEnglish_Final:8688: error: 'SD' was not declared in this scope

    SD.remove("rsset.txt");

    ^

    ShootingEnglish_Final:8695: error: 'SD' was not declared in this scope

    SD.remove("rsset.txt");

    ^

    ShootingEnglish_Final:8702: error: 'SD' was not declared in this scope

    SD.remove("rsset.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void setTimedTime()':

    ShootingEnglish_Final:9192: error: 'SD' was not declared in this scope

    SD.remove("tset.txt");

    ^

    ShootingEnglish_Final:9200: error: 'SD' was not declared in this scope

    SD.remove("tset.txt");

    ^

    ShootingEnglish_Final:9208: error: 'SD' was not declared in this scope

    SD.remove("tset.txt");

    ^

    C:\Users\Dad\Desktop\arduino sketches\ shooting game with printer\Shooting-Sensor-master\Main\ShootingEnglish_Final\ShootingEnglish_Final.ino: In function 'void resetHighscore()':

    ShootingEnglish_Final:9242: error: 'SD' was not declared in this scope

    SD.remove("htime.txt");

    ^

    Multiple libraries were found for "Wire.h"

    Used: C:\Users\Dad\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\libraries\Wire

    Not used: C:\Users\Dad\Documents\Arduino\libraries\Wire

    exit status 1

    'SdFatSoftSpi' does not name a type

    This report would have more information with

    "Show verbose output during compilation"

    option enabled in File -> Preferences.

    1 reply
    0
    None
    basen82enzo4life

    Reply 4 months ago

    Hi it looks like you don’t have the SDFat Library installed in your arduino. Just Google for SDFat arduino and you will find it.

    0
    None
    DardoG

    10 months ago

    Hi Andreas,

    I'm trying to build the target system. I'm pretty new to the arduino platform. I've orderd all the parts an wanted to upload the main to my arduino mega but I get an error. "'SdFatSoftSpi' does not name a type" I would assume that just uploading the file would be enough to make it work. Am I missing something here?

    Thanx in advange.

    5 replies
    0
    None
    basen82DardoG

    Reply 10 months ago

    Hi.
    You need to add SDFat Library in Arduinos Library folder. There is a link to it on GitHub page.
    Good luck
    /Andreas

    0
    None
    DardoGbasen82

    Reply 10 months ago

    Thank you for your reply, i've followed the readme file and downloaded all the libraries and put them in "my documents/arduino/library" or do I need to install them somehow?

    Thanx in advange

    0
    None
    basen82DardoG

    Reply 10 months ago

    Yes you place the Library there, you need to restart arduino after that. SD Fat Library is for the SD Reader Module. I use that becouse it support soft serial.

    0
    None
    DardoGDardoG

    Reply 10 months ago

    i've removed all libraries and added them trough arduino software but still same error message. getting pretty lost now.

    Thanx

    0
    None
    basen82

    Reply 1 year ago

    Thank you