Skip to content

Send "Global Offensive Game State Integration" informations to an Arduino to animate LED Strip

License

Notifications You must be signed in to change notification settings

bastianschildknecht/csgo-gsi-to-arduino

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSGO: Game State Integration to Arduino

Send CSGO:GSI data to Arduino throught serial communication

Prerequisites

Python 3
PIP
git

Materials

  • Arduino (Uno, Mega, Mini...)
  • 3 resistors 100Ω
  • 3 N-Channel MOSFETs
  • 12V LED Strip RGB 4 Pins

Installation

Arduino

Upload the arduino/main.ino to your Arduino.

Python Server

Linux

Copy the repository URL using the green clone widget on the top right. Then use the commands listed below to install the required software.

$ git clone <Copied repository URL>
$ cd csgo-gsi-to-arduino/python
$ python -m pip install -r requirements.txt
$ cp config.json.dist config.json

Fill config.json with your parameters: Example:

{
    "csgogsi":{
        "ip":"localhost",
        "port":"3000",
        "secret":"MY_SECRET_PHRASE"
    },
    "serial":{
        "port": "/dev/ttyACM0",
        "baudrate": 9600
    }
}

Then launch the server with :

python ./main.py

The server is now listenning for POST request from CSGO and sends the data to your Arduino throught serial COM.

Windows

Copy the repository URL using the green clone widget on the top right. Then use the commands listed below to install the required software.

$ git clone <Copied repository URL>
$ cd csgo-gsi-to-arduino/python
$ python -m pip install -r requirements.txt
$ copy config.json.dist config.json

Fill config.json with your parameters: Example:

{
    "csgogsi":{
        "ip":"localhost",
        "port":"3000",
        "secret":"MY_SECRET_PHRASE"
    },
    "serial":{
        "port": "COM3",
        "baudrate": 9600
    }
}

Then launch the server with:

python .\main.py

The server is now listenning for POST request from CSGO and sends the data to your Arduino throught serial COM.

CS:GO Server

Copy the .cfg file into your CS:GO config's directory. This is mine for exemple :

C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg\

You can rename the last part of the config name to whatever you want to avoid conflicts with other GSI services. Example name: gamestate_integration_stagelighting.cfg

then restart CS:GO.

Wiring

csgo gsi led strip arduino

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

Send "Global Offensive Game State Integration" informations to an Arduino to animate LED Strip

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 50.7%
  • Python 49.3%