GithubHelp home page GithubHelp logo

insanity54 / airsoft-domination Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 7.01 MB

Arduino sketch for a one button operation version of the airsoft nightgame game mode, Domination

Arduino 100.00%

airsoft-domination's Introduction

airsoft-domination

Prototype of airsoft-domination box

In combat pursuit sports, there is a game called Domination a.k.a. Flag Control, which is where two teams battle over control of an area.

This Arduino sketch is the brain for a little box with some neopixels and a buzzer that sits in the center of the field. Once the game starts, both teams try to get to the box and click the button to toggle between team colors. The box shows red if red team controls the area, or blue if blue team controls the area.

WARNING

This code is VERY buggy. In it's current form, I do not recommend using this project for airsoft games.

Operation

Since this design only uses one pushbutton, you have two choices of input- long press and click. A long press is pressing the button without releasing for two seconds. A click is a quick press and release in under two seconds.

Power on

Programming mode (beep followed by all neopixels off)

  • click the button to select the time to win. Time to win is a per-team timer. It is the amount of time a team must have control of the sector to win. Each click adds 1 minute to the counter.
  • long press the button to save time to win and enter the next mode

Preparation mode (all neopixels flashing purple)

  • In this mode, the unit is in standby and will wait for input until starting the game. This is the time all players except for the player starting the device go to their starting positions.
  • long press to start the game countdown

Countdown mode (beeping and all neopixels flashing purple)

  • unit beeps and flashes purple for 15 seconds. In this time, the player who started their device has 15 seconds to run and join their team at their starting position.
  • Players on either side of field watch the flashing purple and wait for green.

Game mode (beep and all neopixels solid green)

  • No team is in control at start, so neopixels show green.
  • Green means game on, and all players try to get to the device and push the button.
  • When button is pressed, device beeps and switches to red, and red's timer counts up every 1 second.
  • When button is pressed again, device beeps and toggles to blue, and blue's timer counts up every 1 second.
  • When button is pressed, device toggles to opposite team's color and increases their timer as long as they have control
  • First team's timer to become greater than programmed time to win wins the game.

###End mode (beeps on and off and winning team's color flashes)

  • A team has won! GG.

Schematic

Arduino wiring shematic for airsoft-domination

Credits

Adafruit Fritzing Parts https://github.com/adafruit/Fritzing-Library (CC BY-SA 3.0)

airsoft-domination's People

Contributors

insanity54 avatar

Watchers

 avatar

Forkers

rmaruggi

airsoft-domination's Issues

Neopixel display is sometimes slow to respond to team toggling

Can cause problem where in-game, user presses the button but doesn't get immediate visual feedback that they've pressed the button.

Fix will be in the animate() function. The problem is that the neopixels are only updated every 1s, but it should update immediately if the button is pressed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.