Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capture the Flag
#1
I would like to share something I’ve been wanting for a while so I just decided to learn Arduino and do it myself.

It’s Capture The Flag for your drones (with FPV).


See explanation video here:





This mod was made with Tiny Whoops (check TinyWhoop.com) in mind but really you can use it with any size drone as long as it has a 5.8 Ghz video transmitter on it.

It’s fairly easy to build, costs around £9 (or $12) per flag in materials and you just need to solder a few cables.

You can battle 4 drones (BLUE TEAM - RACEBAND 1 to 4) vs 4 drones (RED TEAM - RACEBAND 5 to 8) in a game of Capture The Flag (as long as your VTX signals allow for that many to be flying at the same time) with as many flags as you are bothered to build!
There are also several new modes you can now try out  - read more on this below.

The code itself is GREATELY based off Chorus RF Laptimer
Visit their repo if you are interested in knowing more about it here: https://github.com/voroshkov/Chorus-RF-Laptimer

Unlike Chorus RF Laptimer, at this moment this mod is standalone and cannot be accessed remotely (yet)

You can though, change the code to match your needs.
I've commented everything that I've changed in the code with and the explanation behind it so it's easy for you to find it and replace it. Pretty sure the code can be improved by A LOT but hey .. it's working!


Materials you need

> 1x Arduino Nano (or an uno if you have one should also work)
https://www.banggood.com/ATmega328P-Ardu...59231.html

> 1x FPV Receiver module with SPI mod (these below already have the mod but double check - google vtx spi mod or check the pictures in this repo)
https://www.banggood.com/FPV-5_8G-Wirele...84775.html

> 1x WS2812 led strip (I used the one below - do not recommend using a bigger strip then 10 leds without external power)
https://www.banggood.com/Eachine-Aurora-...22903.html

> The ability to solder a few cables Smile  ( oh .. you also need a few cables Tongue )

 
How to assemble it

1. Start by soldering the WS2812 strip Ground cable (black) to Arduino ground, the WS2812 strip 5V cable (red) to Arduino 5V and the WS2812 strip din cable (blue) to Arduino D5
2. Now solder the Channel 1 pin in your VTX receiver to your Arduino D10
3. Solder the Channel 2 pin in your VTX receiver to your Arduino D11
4. Solder the Channel 3 pin in your VTX receiver to your Arduino D12
5. Solder the Ground pin in your VTX receiver to your Arduino Ground (the same ground you connected the WS2812 ground to)
6. Solder the 5v pin in your VTX receiver to your Arduino 5V (the same 5v you connected the WS2812 5v to)
7. And finally, solder the RSSI pin in your VTX receiver to your Arduino A3

You can see a build video here:



What? That's it?
Almost! You just need to upload the code to your Arduino via usb and you are done.


How to upload the code

1. Start by downloading and installing Arduino IDE (https://www.arduino.cc/en/Main/Software)
2. Next, download THIS repository and unzip it somewhere in your desktop.
3. Go to the new folder you downloaded and open the file called CTF.INO
4. You will now be able to see a bunch of code and several files open.
5. Goto Tools/Board and pick Arduino Nano (if you bought an arduino nano, otherwise pick the one you have). The processor is ATMega328P.
6. Now to go port and pick the port your Arduino Nano is connected to. If you don't know which one it is, disconnect the nano and check what ports are available. Reconnect the nano, the new port will be the nano. If you don't get any new ports I'm afraid you will need to google how to troubleshoot it Smile
7. You will need to download a Library called FASTLED. Goggle this if you don't know how. You can do it directly from Arduino IDE.
8. VERY IMPORTANT. You will need to play with the RSSITHRESHOLD value to find what works best for you. I find that most receivers work differently and that value can be between 190 to 260. Test it out with with EACH nano you build
9. You can also change MODES (view further down) by changing the MODE value in the code.
10.Finally, when you are ready, goto sketch menu and select upload. If you done everything right you will see an increasing bar on the bottom right handside of the program and then a message saying Done uploading on the lower left handside.




Congratulations!
You are now the proud owner of a CTF flag!

1. The arduino board can be powered by connecting 5v to the 5v connection OR by connecting it to a power bank via USB.
2. You can now also 3D print a neat cover for the arduino : https://www.thingiverse.com/thing:2766437
3. Once you power up the arduino board it will start scanning for all RACEBAND frequencies. It takes ~6 seconds to do a complete loop. 
4. Once it finds the first frequency it will change the LED colour depending if you are BLUE TEAM (RACEBAND 1-4) or RED TEAM (RACEBAND 5-8)
5. Once the flag changes colour it will only scan for the other team frequencies so the scanning takes place faster (~3 seconds for a loop)
6. Protect your flags anyway you can!

MODES

There are currently a few modes available

Mode 2. Capture the flag. Your standard capture the flag where two teams battle it out to have their flag and their opponents flag captured
- R1-R4: TEAM BLUE    //     R5-8: TEAM BLUE


Mode 5. Free For All Deathmatch. You are on your own and need to capture as many flags for yourself as you can.
- R1 BLUE
- R2 GREEN
- R3 YELLOW
- R4 RED
- R5 CYAN
- R6 VIOLET
- R7 WHITE
- R8 MULTICOLOR

Mode 6. Scavenger Hunt. All flags have been hidden. It's your mission to find as many as you can before your battery ends.
- R1 BLUE
- R2 GREEN
- R3 YELLOW
- R4 RED
- R5 CYAN
- R6 VIOLET
- R7 WHITE
- R8 MULTICOLOR


I will try to keep this post up to date with news and new releases, but to be honest, if you follow me in Youtube it will be much faster for you to get updated Smile
Feel free to ask any questions you might have!

My YT channel: www.youtube.com/SeekNDFPV
[-] The following 7 users Like Carlos Costa's post:
  • Kerni_fpv, xcalibur, Oscar, RENOV8R, sloscotty, jimbo_wa, Tom BD Bad
Reply
Login to remove this ad | Register Here
#2
Great work Carlos - love the new version for solo play too! Smile

I've also created a nifty(!) case for the Arduino, VTX and LED strip to snuggle down in - up on Thingiverse...

https://www.thingiverse.com/thing:2780523

[Image: u00Sc7Y.jpg]

[Image: lYXHa6s.jpg]

[Image: lG2ussh.jpg][Image: utDoG23.jpg]

[Image: 4RyaTnS.jpg]

Got a couple of them built up (not by me) and will be testing them out tomorrow...
[-] The following 4 users Like jimbo_wa's post:
  • unseen, Carlos Costa, Oscar, Tom BD Bad
Reply
#3
Love it! I've added your stl link in my github description.

As you said, SP CTF is out, and soon other modes will too Smile
[-] The following 4 users Like Carlos Costa's post:
  • unseen, jimbo_wa, Oscar, Tom BD Bad
Reply
#4
Great work guys Big Grin Carlos we need to play this next time we meet Smile lol looks fun!
Don't be a LOS'er, be an FPV'er :)  My Gear - Facebook - Instagram - Twitter
[-] The following 1 user Likes Oscar's post:
  • Carlos Costa
Reply
#5
Very cool Carlos. We should get this in our office!!
If my post helped you...hit the RATE button.
Reply
#6
(07-Feb-2018, 02:34 PM)xcalibur Wrote: We should get this in our office!!

A team building exercise everyone will want to attend!
Windless fields and smokeless builds
Reply
#7
(06-Feb-2018, 03:27 PM)Oscar Wrote: Great work guys Big Grin Carlos we need to play this next time we meet Smile lol looks fun!

The Single Player mode CTF is wicked! and super hard if you play on harder modes Big Grin
I'm changing a few things for the next release and making it it even harder hahaha .. but you will have the opportunity to change how hard it is (like you do in the current version).

Meanwhile the new release also has Domination CTF where you have to stand by the flag to fully capture it AND a point system to tell you who won, or how well you did in SP mode.
[-] The following 2 users Like Carlos Costa's post:
  • Tom BD Bad, unseen
Reply
#8
Great news!

Version 0.67a is now out (yes I know it's a big jump from 0.4 haha)


What's new?

New mode: Capture the Flag DOMINATION
In this new mode you will need to stay near the flag in order to catch it. The previous simple CTF remains the same

New configuration options: You can now configure the whole system on the go with only 1 button

New timer and scoring system: The game auto starts as soon as it detects a drone. Once the game finishes after 2m 30s (default time, you can change it) it will show you which team won the flag AND will display it in the flag itself.



Lots of other things added like the ability to add or remove pilots, change colours, dificulty and even an auto rssi feature.
I'll add a howto video soon but if you want to update your code visit https://github.com/SeekND/CaptureTheFlag


Update video in my youtube channel soon.
[-] The following 1 user Likes Carlos Costa's post:
  • jimbo_wa
Reply
#9
Version 0.8a out now.
So many cool things that it's hard to list all.

Just watch the video, and doze off to the soothing sound of my voice Big Grin

Reply



Login to remove this ad | Register Here