Close
0%
0%

TANKSIM: An Arduino-Based Tank Control System

The project involves simulating the experience of controlling a tank in a video game using several arduino-coded electronic components.

Similar projects worth following
Our project, developed by a team of three engineering students, aims to simulate the experience of controlling a tank in a video game using Arduino-based components. The system integrates a joystick for aiming, buttons for shooting and forward/backward movement, and a rotary encoder for left and right directional control.

We shared the work like this: Jean-Michel and Damien worked together to program the joystick so it can aim more smoothly. Julien worked on the rotary encoder to move left and right. Then we shared the rest. Jean-Michel did the shooting buttons, Damien the forward and backward ones, and Julien put everything together.
We used Arduino and its various libraries (Keyboard, Mouse) to connect the inputs from the rotary encoder, push buttons, and digital joystick to keyboard keys and mouse movements, allowing the system to perform in-game actions.

  • 'A' and 'D' (left/right) depending on the orientation of the rotary encoder
  • 'W' to move forward ↔ red push button 
  • 'S' to move backward ↔ yellow push button 
  • 'Space' to shoot ↔ blue push button 
  • Mouse movement for aiming ↔ based on joystick input

We had some problems. One was with the joystick. It was hard to detect when it turns clockwise, so turning was not always very precise. We changed the sensitivity, but it stayed difficult.
At first, we wanted to use pedals for forward and backward. But the cables were too short, so we used normal buttons instead.
Because of the small size and complex shape of the rotary encoder, we found it quite difficult to integrate it into a fully and mechanically stable steering wheel, so we didn’t improve its design due to lack of time.
Also, the controller was a bit fragile. The materials were not strong, so we had to be careful during testing.
Even with the problems, we tested and improved the system step by step.
This project helped us learn how to use hardware, program with Arduino, and work as a team. Everyone helped to solve problems and make the system better. In the end, it was fun to use and worked well.
There’s a lot we could have done to make our project more successful because we’re convinced it has a lot of potential. First of all, we could have sourced better materials for the aesthetic aspect and used more interesting sensors (instead of push buttons) to make our game controller more immersive.
Indeed, we could have built a proper cannon device using mechanical components (such as springs), and a visual signal (such as an LED) could have been integrated into the cannon to indicate when it is operational. The LED lights could have been synchronized with the in-game recharging delay of the tank’s cannon.
Furthermore, we could have integrated the rotary encoder into a steering wheel (or a crank) and the buttons into pedals to make the tank’s cabin more immersive.
But our biggest mistake was simply not putting enough effort into polishing our project and not seeking the help and opinions of our professor.
We should also have better documented our progress (in the first version) throughout the project so that you can better understand how we arrived at the final prototype. If we had communicated better with our group and our professor and worked more often and consistently, we would have been able to achieve the desired ambition.

arduino_code_tank_sim.ino

Arduino code for the game

ino - 1.72 kB - 06/19/2025 at 21:57

Download

  • 4 × Push buttons
  • 2 × Rotary encoder
  • 1 × Joystick
  • 30 × Electric cables
  • 1 × Arduino board

View all 8 components

  • Our journey:

    JeanBej1106/18/2025 at 14:59 0 comments

    1-3 : Schools programed activity.

    4-5 : Brainstorm sessions, the tank control center came out on top

    5-6 : Based of of this video : https://youtu.be/tnR-F0_tTio

    We started brainstorming on how we could make somethink similar.

    6-7 : We started programing the rotary encoders and the joystick

    7-10 : Finished programing, decided to start wiring.

    10-11 : Had problems with the wiring, came out harder than we thought

    11-14: Managed to make it work

    15: presented

View project log

  • 1
    The cirucit connection of the rotary encoder

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates