Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Klixxy/ArduTank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ArduTank Project

Static Badge Static Badge


About This Project


This project transforms an Arduino Uno R4 WiFi into a WiFi-controlled motor system using the DroidPad app.

It enables joystick-based movement, button toggles, a speed slider, and even a self-driving mode using ultrasonic sensors. The Motors are controlled using the Arduino Motor Shield Rev3.

The system communicates over TCP, allowing seamless real-time control.


📌 Features


  • WiFi Connectivity : Uses ESP32 (Uno R4 WiFi) to host a TCP server.

  • Joystick Control : Control movement via an 8-axis joystick.

  • Button & DPAD Support : Supports additional input actions.

  • Slider for Speed : Adjust the speed dynamically.

  • Self-Driving Mode : Uses ultrasonic sensors for obstacle avoidance.

  • Motor Control : Smooth forward, backward, and turning motion.

  • Easy Debbuging : Serial prints for DroidPad interaction with IDs.

  • Customisability options : Easy layout adjust thanks to the DroidPad app with unique IDs for everything.


🔧 Setup & Usage


  1. Clone the Repository

    git clone https://github.com/Klixxy/ArduTank.git
    
  • Upload the Code to your Arduino using the Arduino IDE.

  • Monitor Serial Output for the WiFi details.

  • Connect & Control via DroidPad!


App Setup (DroidPad)


  1. Download DroidPad: GitHub Repository

  2. Connect your device to the Arduino's WiFi network.

  3. Scan this QR code with the App to get a ready to use template:

  1. Optional: manually enter the following settings in the app:

    • Type: TCP
    • Host: (Check Serial Monitor for IP)
    • Port: 8080
  2. Add controls and give them IDs (only if you do it manually):

    • 1 D-pad (Default ID)
    • 1 Switch (Default ID)
    • 1 Joystick (Default ID)
    • 1 Slider (Default ID, Max. value 10)
    • 2 Buttons (changed IDs because there are two of them: button1 and button2)
  3. Connect by pressing the small play icon.

  4. Start controlling your car or tank! 🎮


🔌 Wiring & Pin Configuration

Motor Pins as of the documentation of the Arduino Motor Shield Rev3.

Every Pin can be changed, if you have different Hardware.

In this version the Pins 1 and 2 are Outputs for Light and a Horn, hence the toggle on one Button.

Component Pin
Motor A Direction 12
Motor A PWM 3
Motor A Brake 9
Motor B Direction 13
Motor B PWM 11
Motor B Brake 8
Button 1 (only on if pressed) 1
Button 2 (toggled if pressed) 2
Ultrasonic Sensor 1 (Trigger/Echo) 7 / 6
Ultrasonic Sensor 2 (Trigger/Echo) 5 / 4

🛠️ Hardware used (can be adjusted as you need)


  • Arduino Uno R4 WiFi
  • Arduino Motor Shield Rev3
  • 2 x DC Motors
  • 2 x HCSR04 Ultrasonic Sensors

🛠️ Debugging Tips

INFO: for further configuration and usage of IDs please see the Documentation of DroidPad

  • Check the Serial Monitor (9600 baud) for logs.
  • Ensure DroidPad is connected to the same WiFi.
  • If motors don’t respond, check wiring & power supply.

📜 License

This project is open-source under the MIT License.

Happy Hacking!

About

A Tank controlled by an Arduino Uno R4 WiFi using the DroidPad App

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages