Laser Moving Target: Innovative AI-Based Shooting Game

Click Mushroom Cloud to Follow Us

Source of Work: 5th National Youth Artificial Intelligence Innovation Challenge – Open Source Hardware Creative Manufacturing Special Competition

Participating Students:

Honghe Experimental School, Central University for Nationalities, Kong Xiangrui

Honghe Experimental School, Central University for Nationalities, Yu Yu

Original Link: https://contest.dfrobot.com.cn/tcwl2022/project/312598?p=dfrobot2022sh

Introduction

During the traditional sports festival of ethnic minorities held at school, there were events like blowgun shooting and archery, as well as balloon popping lotteries. After throwing arrows or other projectiles, collection was required, wasting certain manpower and material resources. The fixed targets also made the activities less challenging. Inspired by this, we created a laser moving target that allows shooting without the need for projectiles, automatically resets after the target is knocked down, moves left and right, and records scores in real-time. It can be played in two teams: yellow and green, with random target settings to increase the fun of the game and enhance players’ concentration to a certain extent.

The laser moving target includes a timing device, target device, and scoring device. It can be selected for two-player or single-player mode by changing the facial recognition of the AI camera, and it is controlled by an infrared remote control device.

Timing Device: The timing device uses two LED light strips to simulate the time loss indicator, with one minute as a cycle. Every ten seconds, one light goes out, and during the last ten seconds, all lights blink red to remind players;

Target Device: The target’s environmental light sensor detects the laser. While the target moves left and right, scoring occurs when the laser hits the scoring target, accompanied by corresponding hit sound effects and visual effects. The target’s score is determined by the random color of the LED light strip in front;

Scoring Device: The LEDs representing the two teams light up to indicate the start of scoring; scores are displayed on an eight-digit digital tube; when remote control stops, the final winning team is announced via voice broadcast.

Laser Moving Target: Innovative AI-Based Shooting Game

Step 1 Assign pins, connect hardware, and write the timing program

Connect the AI camera, simulated light sensor, digital big button module, digital LED lighting module, WS2812 RGB lights, TM1650 eight-digit tube, servo module, infrared receiving module, MP3 player, remote control, and motor to the Arduino Uno main board, assigning each pin; write the timing module program, where two WS2812 RGB light strips light up four green lights, two yellow lights, and one red light. Every ten seconds, one green light goes out, and after all green lights are out, one yellow light goes out every five seconds, with the red team blinking to remind players during the last ten seconds.

Laser Moving Target: Innovative AI-Based Shooting Game
Laser Moving Target: Innovative AI-Based Shooting Game

Step 2 Display of the Target Scoring Lights

Using a random shooting method, the random target is determined by the color of the flowing lights. Write the flowing light module program. To enhance the prompt effect, two light strips are combined into a long light strip, where two WS2812 RGB lights randomly illuminate yellow, green, and blue colors to remind players of the color to hit. When the simulated light sensor detects the laser (simulating a hit), the system automatically switches to the next color randomly and scores.

Laser Moving Target: Innovative AI-Based Shooting Game
Laser Moving Target: Innovative AI-Based Shooting Game

Step 3 Scoring Device

Write the scoring display module and the program for two-player mode, displaying the scores of the red and blue teams on the TM1650 eight-digit tube. The AI camera distinguishes between red and blue teams by recognizing faces; write the score comparison function and remote control function to compare the scores of the red and blue teams and announce the winning team via the MP3 player, while using the remote control to start and pause the game; add sound effects that enhance the atmosphere when hitting.

Laser Moving Target: Innovative AI-Based Shooting Game
Laser Moving Target: Innovative AI-Based Shooting Game

Step 4 Building and Debugging the Moving Target Device

Add a servo rotation effect, where the target rotates back upon being hit and returns to its original position after one second; different servos correspond to specific colors of targets; build the left and right moving device for the target, creating the laser gun using motors, gears, and racks, and connecting them with blocks; debug the transmission device, timing device, flowing light device, and scoring device programs to ensure the target can move left and right while completing other tasks.

Laser Moving Target: Innovative AI-Based Shooting Game
Laser Moving Target: Innovative AI-Based Shooting Game

Step 5 Assembly and Debugging

Fix the simulated light sensor on the target, connect the target to the servo, and finally place the servo on the left-right moving device; organize the wiring and debug the operation.

Laser Moving Target: Innovative AI-Based Shooting Game
Laser Moving Target: Innovative AI-Based Shooting Game

Hardware List

  • 1x Arduino Uno Mainboard

  • 1x Arduino Uno IO Expansion Board

  • 1x AI Camera

  • 3x Simulated Light Sensors

  • 1x Digital Big Button Module

  • 2x Piranha Lighting Modules

  • 4x WS2812 RGB Light Strips

  • 1x TM1650 Eight-Digit Tube

  • 3x Servo Modules

  • 1x Infrared Receiving Module + Remote Control

  • 1x MP3 Playback Module

  • 1x Motor

  • 1x Motor Driver Module

  • Several LEGO Blocks

Laser Moving Target: Innovative AI-Based Shooting Game

Hardware Connection Diagram

Attachments (Code details see original text)

Laser Moving Target: Innovative AI-Based Shooting Game

“Laser Moving Target” Structural Design Drawing

Display Video

Previous Recommendations

[Excellent Competition Works] Sound and Light Reminder Intelligent Judge for Military Chess

[Beginner] How to Control Arduino Using Python and PinPong Library

[Excellent Competition Works] An AI-Based Toy for Simulated Shooting

Embedding Large Models into the Skyboard Robot to Evaluate Itself in the Mirror

Using Large Language Models to Control Skyboard Robots

[Skyboard + Large Model] Smart Home Assistant – GPT3.5 Function Calling to Control Hardware

Building an AI Assistant on a Skyboard Single Board Computer Using ChatGPT API and Azure Speech API

Leave a Comment