{"id":13589854,"url":"https://github.com/HailStorm32/LU-Player-Tracker-Code","last_synced_at":"2025-04-08T09:34:29.343Z","repository":{"id":185817450,"uuid":"581948039","full_name":"HailStorm32/LU-Player-Tracker-Code","owner":"HailStorm32","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-29T06:18:16.000Z","size":138,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-30T04:25:27.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HailStorm32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-12-25T01:56:44.000Z","updated_at":"2023-03-01T00:36:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"6806934d-9f3c-4668-83da-5fd45e2d83f4","html_url":"https://github.com/HailStorm32/LU-Player-Tracker-Code","commit_stats":null,"previous_names":["hailstorm32/lu-player-tracker-code"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HailStorm32%2FLU-Player-Tracker-Code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HailStorm32%2FLU-Player-Tracker-Code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HailStorm32%2FLU-Player-Tracker-Code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HailStorm32%2FLU-Player-Tracker-Code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HailStorm32","download_url":"https://codeload.github.com/HailStorm32/LU-Player-Tracker-Code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223314426,"owners_count":17125081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T16:00:35.404Z","updated_at":"2024-11-06T09:31:43.539Z","avatar_url":"https://github.com/HailStorm32.png","language":"C","readme":"\n![Photo of board](https://i.imgur.com/III7pWA.jpg)\n# Description\nThis repository holds the code for the LU Player Tracker board. You can find the PCB repository [here](https://github.com/HailStorm32/LU-Player-Tracker-PCB). \n\nThis board shows the player count and locations in real time by lighting up the respective world RGB LED and seven segment display. The player location and count is sent via MQTT from a Darkflame Universe private server. \n\n\u003e Darkflame Universe is a server emulator for the defunct LEGO Universe MMO. You can find more info about the project [here](https://github.com/DarkflameUniverse/DarkflameServer)\n\n\n# Setup\nIn order to flash the board and get a working product, there are a few steps that need to be taken.\n\u003cbr\u003e\n\n### Environment setup\nThere are multiple ways to setup the development environment. I would recommend reading [Espressif's documentation](https://docs.espressif.com/projects/esp-idf/en/v5.0/esp32s3/get-started/index.html#manual-installation) \n\nHowever, the quickest and most straightforward way is to use the [ESP-IDF Tools Installer](https://docs.espressif.com/projects/esp-idf/en/v5.0/esp32s3/get-started/windows-setup.html#esp-idf-tools-installer) (For Windows). \n\n\u003cbr\u003e\n\n### Config\n\n 1. Navigate to the code directory and create a file called `credentials.h`\n 2. Open the file and add the following\n \n```\n// MQTT\n#define  BROKER_ADDR  \"mqtt://\u003cbrokerIP\u003e\"\n#define  BROKER_UNAME  \"\u003cbrokerUname\u003e\"\n#define  BROKER_PASS  \"\u003cbrokerPass\u003e\"\n\n// WIFI\n#define  WIFI_SSID  \"\u003cWIFISSID\u003e\"\n#define  WIFI_PASS  \"\u003cWIFIPass\u003e\"\n```\nExample\n```\n// MQTT\n#define  BROKER_ADDR  \"mqtt://192.168.0.0\"\n#define  BROKER_UNAME  \"UserName\"\n#define  BROKER_PASS  \"password123\"\n\n// WIFI\n#define  WIFI_SSID  \"wifissid\"\n#define  WIFI_PASS  \"wifiPassword123\"\n```\n3. Save and close the file\n\n\u003cbr\u003e\n\n### Flashing\n\n 1. Open the ESP-IDF 5.0 CMD (if you used the installer) and navigate to the code directory.\n 2. In the code directory, run `idf.py set-target esp32s3`\n 3. Then run `idf.py build`\n 4. Once that has finished building, find connect the board to the PC via the USB connection and note the COM port\n \n\n\u003e NOTE: The USB does **not** supply power. You will also need to connect the power cable to the board to flash.\n5. Then run `idf.py -p COM# flash` where `#` is the COM port number\n6. If nothing failed, your board is now flashed and you can disconnect the USB cable\n\n\u003cbr\u003e\n\n### Server Side\nYou will need the following setup:\n\n - Functional [Darkflame Server](https://github.com/DarkflameUniverse/DarkflameServer) *(running on Linux)*\n - MQTT Broker\n - Tracker script\n\nThe last two items are covered below.\n\n \u003cbr\u003e\n  \n#### Installing MQTT broker\n\n1. run `sudo apt install -y mosquitto mosquitto-clients`  \n  \n2. run `sudo systemctl enable --now mosquitto.service`  \n  \n\n#### Configuring Broker \n\n1. Open the broker config file using  \n`sudo nano /etc/mosquitto/mosquitto.conf`  \n  \n2. Add the following line to the **top** of the file  \n`per_listener_settings true`  \n  \n3. Add the following lines at the **bottom** of the file  \n\n```  \nallow_anonymous false  \nlistener 1883  \npassword_file /etc/mosquitto/passwd  \n```  \n  \n\n4. Set a username and password for the broker by running \n`sudo mosquitto_passwd -c /etc/mosquitto/passwd YOUR_USERNAME` \n  \n5.  Restart the broker with `sudo systemctl restart mosquitto`  \n  \n6. Make sure its running with `systemctl status mosquitto`  \n  \n\n#### Install The Script\n\n1. Clone the [this](https://github.com/HailStorm32/hailstorms-darkflame-server-scripts) repository and follow [these](https://github.com/HailStorm32/hailstorms-darkflame-server-scripts#playercntdisplaypy) instructions\n  \n  \n\n#### Last Step\n\n1. Allow tcp port `1883` through the firewall  \n\n\n\u003cbr\u003e\n\n# Use\n\n#### Power Supply\nThe board is powered via the 5.5mmx2.1mm barrel jack on the left side of the board. It requires a [5V 2A supply](https://www.amazon.com/gp/product/B0B6PQV88X).\n\n\u003e The USB does **NOT** supply power, and is only for flashing and serial in/out\n\n\n\n#### Connecting to WiFi\n\u003e *Currently only available on the `wifiConfigAP` branch*\n\nThe board will allow you to enter your WiFi credentials via a website broadcasted by the board.\n\n 1. Power on the board\n 2. Then, while holding down the MODE button, briefly press the RESET button. \n\t \u003e *Its easier to press the reset button with a small flat object like a LEGO 1x4 tile*\n\n\t ![enter image description here](https://i.imgur.com/kQesXeW.png)\n 3. Keep holding the MODE button until you see two solid dashed lines in the seven segment\n\t ![enter image description here](https://i.imgur.com/4qJ6HoI.png)\n 4. Your board should now be broadcasting a hotspot with the name `LU Player Tracker`\n 5. Connect to the hotspot with the password `LUisthebest`\n 6. Navigate to `192.168.4.1`\n 7. Enter your WiFi's SSID and password and click save\n 8. You should get message saying your credentials are saved \n 9. Power cycle the board by either briefly pressing reset, or unplugging/plugging in the barrel jack\n 10. A couple seconds after reboot, you should see the seven segment change to showing numbers and the world LEDs turning on (if they are populated) \n\n---\n\nCredit to `FutronBob` for the map layout that inspired this project\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHailStorm32%2FLU-Player-Tracker-Code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHailStorm32%2FLU-Player-Tracker-Code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHailStorm32%2FLU-Player-Tracker-Code/lists"}