{"id":39129753,"url":"https://github.com/fidoriel/track38","last_synced_at":"2026-01-17T21:14:51.363Z","repository":{"id":106982610,"uuid":"326252609","full_name":"fidoriel/track38","owner":"fidoriel","description":"Control your LEGO train layout from your pc/mac/raspberrypi","archived":false,"fork":false,"pushed_at":"2025-11-15T12:17:59.000Z","size":1196,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-15T14:21:41.646Z","etag":null,"topics":["arduino","bluetooth-low-energy","cross-platform","lego","open-source","poweredup","powerfunctions","raspberry-pi","simpleble","trains","wxwidgets"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fidoriel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-02T19:06:59.000Z","updated_at":"2025-09-30T08:44:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"604ffad8-6a8f-40ad-a0b5-0b6146e94691","html_url":"https://github.com/fidoriel/track38","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fidoriel/track38","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidoriel%2Ftrack38","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidoriel%2Ftrack38/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidoriel%2Ftrack38/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidoriel%2Ftrack38/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fidoriel","download_url":"https://codeload.github.com/fidoriel/track38/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidoriel%2Ftrack38/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28518614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:55:29.170Z","status":"ssl_error","status_checked_at":"2026-01-17T18:55:03.375Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["arduino","bluetooth-low-energy","cross-platform","lego","open-source","poweredup","powerfunctions","raspberry-pi","simpleble","trains","wxwidgets"],"created_at":"2026-01-17T21:14:50.742Z","updated_at":"2026-01-17T21:14:51.350Z","avatar_url":"https://github.com/fidoriel.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# track38\n\ntrack38 is a cross-platform LEGO model train control system. It does support the LEGO PoweredUp system via Bluetooth, LEGO PowerFunctions via an Arduino and IR. Support for 9V RC LEGO trains is planned. It can control track switches equipped with a 4DBrixx Servo track switch brick as well.\n\nSupported Platforms (Blutooth 4.0 or higher is needed):\n - Windows 8 and newer Intel 64bit\n - macOS Intel and ARM 64bit\n - Linux Intel 64bit and Raspberry Pi OS former raspbian 32bit\n\nThe program including the Arduino Client is written in C and C++.\nThe GUI depends on wxWidgets, the Bluetooth functionality is implemented with SimpleBLE and the PowerFunction capabilities are based on the work by Jurriaan Pruis.\nThe track38 application for Desktop is licensed under the GNU GPLv3. The Arduino Client is licensed under the MIT License.\n\n# How it Works\n\nmacOS note: Please allow Bluetooth Permission if track38 asks for. Otherwise it will terminate and you have to go to the Settings-\u003eSecurity-\u003ePrivacy and tick track38. If track38 does not have permissions it will terminate.\n\nPowerFunctions and track switches requirements.\nUpload the track38 Arduino Firmware to your board. This needs to be done only once.\nThis can be a little bit tricky: Download and install PlatformIO for Visual Studio Code on your machine. Plug in the Arduino. Open the Project (https://github.com/fidoriel/track38-clients) and hit upload and wait a few seconds.\n\nAdd Trains:\nGo to \"Edit Trains\" and click \"New\" on the left choose the controller and fill in the information. \n\nCase Bluetooth:\nScan for Hubs, press the Button on the PoweredUp controller and select your train's controller via name or MacAdress on the dialog window. Please make sure your Hubs have different names.\nYou can add as many trains as you like. But connections at the same time are limited to 7. (numer can change depending on your system)\n\nCase PowerFunctions:\nRefresh the ComPorts and choose your Arduino (it has to be plugged in).\nConect an 940nm (and a resistor) to a GPIO pin and enter the pin in the train config for every PowerFunctions train you want to control with this LED.\nPlease Note: if you have a large layout with hidden tracks you might want to add more IR LEDs to reach all corners. For IR signals can not be verified if the train has recieved it.\nThe number limit of Lego PowerFunctions trains is 8. Two per chanel * four channels.\nYou can add as many Arduino controller as you like. But connection is limited by your computers power deliver abilities. You might use external power supplied or powered hubs.\n\nAdd Trackswitches:\nGo to \"Edit map\". Drag symbols from the Symbol Picker to recreate yout train layout on screen.\nConnect the servo with your Arduino.\nArduino 5V to servo red\nArduino GND to servo black/brown\nNow choose an empty GPIO pin. Connect this pin to servo yellow.\nRight Click on the map -\u003e DragMode\nClick on the track switch you want to control. Refresh the comport and select your Arduino.\nEnter the pin you connected the servo to.\nPut the track switch servo thing on to your Lego Trackswitch.\n\nNow you are good to go:\nGo to Control.\nYour Arduino Controller should connect automaticly.\nYour trains are shown on the \"Train Control\" Panel. If the stop button is greyed out the connection was not succesful. Plug in the Arduino and check if you always selected an port for trains or switches which need one. If so go to Control-\u003eReload Connections menue option or hit Ctrl-R to reload. You have to pair your PoweredUp hubs each manually. Press the Bluetooth Symbol next to the train silder. Now track38 will search for 5 seconds for the Hub. Please press the button on the hub within this time frame. If the connection was succesful the Bluetooth sing should show a small disconnection icon. By pressing on the switches in Control you can toggle them and it will show the current switch position on the map. If track38 does not know the position the first toggle will switch them straight if necessary. By sliding the speed-slider to the left or right, the train will start move. With the stop sing the train will stop. Terminating track38 will stop and disconnect all trains.\n\n# TODO \n - Make .ini file loading save\n - add 9V RC train\n - improove Serial conection method\n - add App wide settings\n - change all serial ports once\n - add PoweredUp track switches\n - add import/export\n - add reset App option\n - add update notifications\n - add more user warnings \u0026 exeptions\n - improove build environment\n\n# Build\n\n\n```bash\ngit clone --recurse-submodules git@github.com:fidoriel/track38.git\ncd track38\nmkdir build\ncd build\ncmake ..\nmake -j\n```\n\nUpdate after init\n```bash\ngit submodule update --init --recursive\n```\n\n\nLinux/macOS: Information can be found in the CMakeLists.txt. Please note right now, track38 needs a staticly build wxWidgets instalation in the home directory of the user. Build and clone commands can be found there as well. Cmake, make and gcc(Linux), clang(macOS) are required.\n\nWindows needs also a static instalation in the home directory. You need to change the wxWidgets_ROOT_DIR var in the cmake file to make it fit your system. For building you need the Developer PowerShell distributed with Visual Studio, you will also need cmake. Commands for Windows can be found in the cmake file. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffidoriel%2Ftrack38","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffidoriel%2Ftrack38","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffidoriel%2Ftrack38/lists"}