Jump to content
THIS IS THE TEST SITE OF EUROBRICKS!
THIS IS THE TEST SITE OF EUROBRICKS!

Novakasa

Eurobricks New Members
  • Joined

  • Last visited

  1. I'll definitely try to implement the motor customizations soon, but in the meantime, you could tweak the numbers in the pybricks programs once you have extracted the brickrail release. The program is located in ble-server/hub_programs/layout_controller.py In line 35, you should be able to customize the pulse duration here (currently it is 600 ms): def __init__(self, port, pulse_duration = 600): And the motor strength can be adjusted in line 49 (default is 100 DC): self.motor.dc(100*sdir) Changing these values will change it for every switch at the same time, in the future I'll make it so you can change these values on a per-switch basis.
  2. Thanks for the interest! I did write about my switch solution in the wiki: https://github.com/Novakasa/brickrail/wiki/5-Setup-your-devices#setup-your-switches I also linked some instructions for it: https://github.com/Novakasa/brickrail/files/11241947/technic-switch-motorized-v2-steps.pdf I also had to fiddle quite a bit, this is my second design which I made mostly using technic pieces, as I wanted something that absorbs all excess torque by itself, not applying any force that could disconnect the mechanism from the switches. However, the clutch gear seems to be a bit too weak for my newest trixbrix switches. I think using a trixbrix switch a lot loosens the mechanism, since all my older switches work flawlessly with this design. I guess you can try to replace the clutch gear with a normal gear, but then I should probably expose some settings in the Brickrail GUI for the motor strength (in DC) and pulse duration, in order to not apply too much torque. Also since I made the instructions above, I noticed a flaw where the brown axle would sometimes block the mechanism from switching. To fix it, move the black pin in step 10 one hole to the right. This blocks the brown axle from entering this hole. Also when trying Brickrail, currently it is expected that the sensor only sees dark or desaturated colors except for the markers. This can be an issue when using a layout e.g. on green baseplates or a colorful floor. I am planning to do something about it (see also this disccusion), but for now there is only the "chroma threshold" setting for trains which can be increased if you get wrong marker detections. If you encounter any issues, feel free to report them on github (discussions is a good place if you are looking for help), and I might be able to apply fixes as well.
  3. Just published the 1.0.0-alpha.3 release. Get it here: https://github.com/Novakasa/brickrail/releases/tag/v1.0.0-alpha.3 This release adds a number of usability improvements and quality of life features. Brickrail now does not rely on a custom version of pybricks firmware anymore and aims to be compatible with the current pybricks beta firmware. It is still recommended to flash the specific version that comes with the Release, since this is the version Brickrail is tested with. For people trying out the software, I would really appreciate a report here or over on Github discussions for any issues of even any success you've had. I'll need some reports to have an idea how stable Brickrail is. Reports for any issues following the instructions in the wiki are also greatly appreciated. Changelog: Added Added "discouraged" reversing behavior. With this option, the train will only reverse when there is no other option. (#125) Distinguish current train position from "home" position. Current position is saved in settings, home position saved in .brl layout file. (#78) Added "Download" checkbox to hub GUI. Unchecking it skips downloading the program to the hub, assuming that it is stored on the hub (#92). Brickrail stores for each hub name the last hub program hash. If it is different, Download checkbox is checked automatically to make hub download the new program. Added File logging. Logs will be available in user folder. Added Control devices mode for switches only, allowing manual train control (#77). Move view appropriately when changing "layers unfolded" or changing active Layer. Finally added ability to remove hubs from project. Make track section select easier by flipping the selection of single track appropriately. Automatically select connected track when deleting a single track segment. Current brickrail layout path now displayed in window title. Added configurable motor and sensor parameters to Trains (#116, #85). Added battery voltage display for hubs (#111). Added ability to invert train motor polarity (#112). Added layout changed label in status bar to highlight unsaved changes (and for debugging). Added robustness for crashed BLEServer, new button to manually start it again and display more errors related to BLEServer connection (#51). Fixed Fixed issue when adding layer after loading a layout. Fixed requirement for program start timeout being very long by instead starting the timer after program was downloaded. Fixed some track connections not disconnected properly when deleting track. Fixed phantom prior sensors reappearing despite deleted after loading brickrail layouts (#117). Disable Godot HiDPI setting, since we currently don't react to user OS-level DPI scaling (https://github.com/Novakasa/brickrail/discussions/107#discussioncomment-5689736). Fixed false unsaved changes prompt when train had been selected. Fixed "control devices" enabled despite error while starting hub program. Changed Moved away from frozen module in firmware. Brickrail should now be compatible with standard pybricks firmware. Allow enabling/disabling "only forward" setting for trains in "Control layout" mode.
  4. Brickrail doesn't need to be installed, the releases are just archives of a portable binary executable and some other files that need to be kept in the same folder. Go to the releases page on the github repository and navigate to the latest one: https://github.com/Novakasa/brickrail/releases/tag/v1.0.0-alpha.2 Download the zip archive (not source code) for your platform. In your case, that would be brickrail-windows-v1.0.0-alpha.2.zip Unzip the archive to your favorite location using a zip extraction tool, e.g. WinRar Start Brickrail.exe (On linux you might need to enable the execution permission on the binary file before you can run it) For next steps read through the Wiki: https://github.com/Novakasa/brickrail/wiki
  5. Indeed, that would be great. It's not planned in the short term but I am thinking about it. Technically, the Godot engine, which I am using for the interface and general logic also exports to the web. The most difficult part would be to move the bluetooth part away from the python server and move to web bluetooth in some way, but I have no idea how feasible this is with Godot engine. I have unfortunately no experience in web development yet. I actually started this project using a different approach with official firmware and the `bricknil` python library, which exposes the LEGO API to the PC. However, since the hubs don't process the sensor data themselves using this approach, I had to rely on very high rate of bluetooth communications, and I might have found a limit of it only working reliably with at most 3 LEGO PoweredUp hubs at the same time. With pybricks, I can move a lot of the sensor processing and logic to the hubs themselves. The communication then only has to handle quite high level commands and signals, so I have not found any limits with how many hubs I can operate at the same time yet. Of course, 2 years ago I was still quite inexperienced in this project so there might have been a better way with only original firmware.
  6. Novakasa changed their profile photo
  7. Unfortunately, I don't have a mac device to test, however as far as I know all the dependencies are mac compatible in principle. So I might be able to build a mac version using Github actions, but I won't be able to test it. I think I'll see if I can do that and release it as an experimental build in the next days/weeks, and it would be great if you could test it! However, you'll need pybricks installed on your hubs, and specifically the version provided with the Brickrail release (independent of which OS you are using).
  8. Thanks! The video above was made more like a trailer, if you'd like to see a longer demo, look here:
  9. Hey all, Yesterday, I created the first alpha release for my open source LEGO train automation software, so I created a short trailer for it: Brickrail features a GUI running on a BLE-capable PC. It connects to PoweredUp hubs running Pybricks firmware. The trains detect their location using a PoweredUp Color & Distance sensor pointed on the tracks. Block sections on the tracks are delimited by colorful markers. Head to Github page to download the most recent release, and visit the Wiki on Github to learn more about how Brickrail works! More longer demo videos are live on youtube.
Sponsored Links