Introduction: Arduino & CS:GO = Augmented Reality With Tens Device
Hi there! Today we will integrate Counter Strike: Global
Offensive game with the TENS (transcutaneous electrical nerve stimulation) for the augmented reality. ( Not the AR you know, i mean; increased pain :)
First things first we have to know what is TENS.
Step 1: Part 1: Understanding TENS
TENS: It is a method (/device) which is used for stimulating
body with electricity. Generally it’s using at medical, physiotherapy and massage purpose. But be aware of that; it’s not like Piezoelectric Spark Generator (in lighters). The difference between TENS and Spark Generator. At the element inside a lighter; you just feel the electrical pain. But at the TENS; you feel pain AND you can not resist it. Your motor neurons automatically respond it.
Step 2: Part 2: Ethical and Side Effects
You have to be careful with that project. Because with the
one wrong single ling code, you can get harm. Not even talking about paraysis, the death can be happen too. So keep your attention on high while you are reading all of these. Whiile you are soldering, writing your code etc. By the way you are agreeing the result by reading this. I do not take any responsibilities.
Step 3: Part 3: Parts List
- Tens Device (Also known as tens device, I sed Acura AC 614 on this project)
2 Channel Relay
Soldering Iron (cable, cutter etc…)
Electrodes (IF it’s not included with the tens device you bought, 2 piece is enough)
EKG Gel- Creme
CS: GO Game (No need to online, you can try with bots too)
And little C# programming will be enough
Visual Studio & Arduino Ide (Software parts…)
CS:GO GameState Integration CFG
Step 4: Part 4: First Look to Tens Device
So, we will do a short circuit to device but before doing that, we have to know how it works isn't it. When you have the device, try it :) Try on your own body for determining of "How my body reacts when i put the electrodes to there-there-or there etc." The putting shape, the position, these are important. I made a simple diagram/shema/drawing to my arm as you see. It's important to know how you will react. So do that :)
Step 5: Part 4: Short Circuit to Tens Device
First thing first, you have to simulate the device for it
can be controlled by you with serial communication on computer. But before you that, you have to analyze and take a look to how your device works.
First look of Tens Device (for Acura AC 614)
So, after you figured it out, you have to short circuit to On-OFF buttons. It depends to your device’s buttons of course. For mine, i did something like that.
Short circuit for simulating On-Off buttons on device.
Step 6: Part 5: the Arduino Code
For just in case; Code at Pastebin
Step 7: Part 6: the C# Code
So for that, you need a some library and files.
1) GameState Integration CFG: It is a somekind of api which Valve gives to developers.
2) CSGSI Library: The library which i appreciate and thankful for that to rakijah . This is for C# part. Getting values etc…
After you installed & seting up these, Create an C# Console Application. Import the dll & library to your project. And follow the my code; ( By the way, i’m not just getting if the health reduced. For trying a gone a little bit far too at modifying :)
For just in case; Code at Pastebin
Step 8: Part 7: Finish & Result
There is no any using in daily life, i did that project just because i wanted to do. And bored too of course :) By the way my native language isn't English. I didn't use Translate or something but if i made any misspelling, forgive me :) Comment if you have any trouble/issue on your project. Happy painful games :)