Cosmik42 Posted January 19, 2019 Author Posted January 19, 2019 (edited) 1 hour ago, Lok24 said: WEDO Distance: connected, shows values in log, but cannot be triggered by prog (i.e. "Distance is below 3")? They should! Can you show me how you setup your event? 1 hour ago, Lok24 said: WEDO Tilt: detected, but not shown in log, cannot be triggered I don't own one, so it's not supported yet. Question: what usage scenario do you have in mind? I will try to find this hardware, but it's hard to invest in it when there is no clear usage. On my side, my wide and kids are away this weekend and i have been programming like a mad dog in order to achieve my ultimate goal with this program: Create a fully autonomous self-driving system for lego trains! V0.5 already managed the anti-collision part. So I have been working on the 'self-driving' part with automatic switch based on the destination that a train plans to go to! Here is my setup: I believe I should be done tonight after programming until 7am yesterday :D Edited January 19, 2019 by Cosmik42 Quote
Lok24 Posted January 19, 2019 Posted January 19, 2019 (edited) Hi, Ok, that doesn't work at all As alredy mentioned I have two poweredup Hubs. One accepts two sensors or a sensor and a boost motor. This one doesn't trigger on WeDo Distance Sensor(and this one has been Updated, if I remember corretly) The other accepts only one sensor (WeDo) , this one triggers the event The reason is obviously a different FW in the Hubs, and not your program So I've got to find out what FW-Versions I got installed by the automated process. WeDo Tilt: got no application yet, but as you asked for the Tilt WeDo 1 thought I feed some Info..... Edited January 19, 2019 by Lok24 Quote
Cosmik42 Posted January 19, 2019 Author Posted January 19, 2019 5 minutes ago, Lok24 said: One accepts two sensors or a sensor and a boost motor. This one doesn't trigger on WeDo Distance Sensor It doesn't trigger at all? Never experienced that. What about putting only one sensor? 6 minutes ago, Lok24 said: WeDo Tilt: got no application yet, but as you asked for the Tilt WeDo 1 thought I feed some Info..... Ah indeed! But because this is WeDo Tilt and not SBrick, it is not implemented at all. But I could try to program 'in the dark' and have you try the output. @Lok24 - I am going to add something. You will be able to pick which port you want an event to trigger with. That might help. Quote
Lok24 Posted January 19, 2019 Posted January 19, 2019 No, it doesn't trigger at all, but it's different FW from the one than works, perhaps newer than all your Hubs? And of course, there's only one sensor attached for testing. I'm just gong to find out the versions..... With the tilt: this is in no way important. Quote
Cosmik42 Posted January 19, 2019 Author Posted January 19, 2019 Are they both Train Hubs BTW? Just now, Lok24 said: No, it doesn't trigger at all Just to clarify => Do you see any distance output in the console on the faulty Hub? Because if so - then it's my software that has an issue. Quote
Cosmik42 Posted January 19, 2019 Author Posted January 19, 2019 Just now, Lok24 said: Yes, sure PoweredUp Hubs, HUB No 4 Just to clarify => Do you see any distance output in the console on the faulty Hub? Because if so - then it's my software that has an issue. Quote
mawe Posted January 19, 2019 Posted January 19, 2019 3 hours ago, Cosmik42 said: Question: what usage scenario do you have in mind? In the past I wanted to use the distance sensor to automatically retract and extend the landing gear of an airplane. With the tilt sensor I wanted to control the pedals on the wings. But the tilt sensor only reacts to rolling in one direction per axle and only around two axles. But i have no usage for trains and a tilt sensor. Maybe for the automatic unloading of a tilting wagon. By the way, you're still doing a great job. I just ordered some hubs and train motors to play around a bit. It's almost impossible to get color sensors right now. Quote
Lok24 Posted January 19, 2019 Posted January 19, 2019 1 minute ago, mawe said: By the way, you're still doing a great job. I just ordered some hubs and train motors to play around a bit. It's almost impossible to get color sensors right now. There are two in a swiss BL Store......but yes, could be more than 38 worldwide But the parts had been listed at LEGO S@H for a short time, part# is 88007, so perhaps..... Quote
Cosmik42 Posted January 19, 2019 Author Posted January 19, 2019 Sneak peek to what is coming up! Fresh UI, robust device detection and ... self-driving lego trains! Quote
zephyr1934 Posted January 20, 2019 Posted January 20, 2019 I just have to say that this looks insanely cool... Quote
Cosmik42 Posted January 20, 2019 Author Posted January 20, 2019 3 hours ago, zephyr1934 said: I just have to say that this looks insanely cool... Thank you! Hopefully will be able to share a build today. The self-driving system has a lot of edge cases that I am squeezing one by one. Quote
Toastie Posted January 20, 2019 Posted January 20, 2019 3 hours ago, zephyr1934 said: I just have to say that this looks insanely cool... … and in addition it works flawlessly. Is someone at TLG watching this? For sure they should hire @Cosmik42 - fulltime - to make sure that their nifty new electronic devices they throw now and then on the market don't just evaporate into nowhere because there was next to nothing supporting them on the software side. Just imagine this software comes with a train set. I bet people will really want to expand a layout as fast as it goes … Yes. This is unbelievable cool!!! All the best Thorsten Just now, Cosmik42 said: The self-driving system has a lot of edge cases that I am squeezing one by one. Hi @Cosmik42 you are continuing to impress deeply - this is an incredible project. One thing to consider maybe: It is also fun to play manually with a layout. Sure, automation is tough, challenging and at the same time very rewarding to watch all the activity. And: Many people will want that - its very nice for train shows/exposition etc. I like to push buttons, dials, sliders and control things by myself - but that is just what I do when playing … This is the best piece of "LEGO" software I have seen for long! Happy further programming!!! Best wishes Thorsten Quote
Cosmik42 Posted January 20, 2019 Author Posted January 20, 2019 (edited) 1 hour ago, Toastie said: you are continuing to impress deeply - this is an incredible project. One thing to consider maybe: It is also fun to play manually with a layout. Thank you so much Thorsten! Totally agree on the manual play part. This is why I put some extra love in adding visual and icons to the top tier which is 100% meant to play manually. It's also at the top because I want it to be the most obvious and immediate thing to do. Slide a speed dial or press a switch button. I want to thank you as well for your continued support on this project. Have a great weekend! Edited January 20, 2019 by Cosmik42 Quote
Cosmik42 Posted January 20, 2019 Author Posted January 20, 2019 V0.6 is out! * Self-Driving Trains! * New UI * More Robust Hub Detection * Add Port Selection for Sensor Events * Bug Fixes You can download this version here: https://www.dropbox.com/sh/185eb598dldqodm/AADXVEz2u5nPTAlJLYD_18_Ka?dl=1 Quote
Cosmik42 Posted January 20, 2019 Author Posted January 20, 2019 This post is getting pretty long so I create a separate one that act as an 'How-To' for the Self-Driving System. Quote
Jetro Posted January 20, 2019 Posted January 20, 2019 12 hours ago, Toastie said: Is someone at TLG watching this? For sure they should hire @Cosmik42 - fulltime - to make sure that their nifty new electronic devices they throw now and then on the market don't just evaporate into nowhere because there was next to nothing supporting them on the software side. I'm sure there's someone keeping an eye on how things develop in the AFOL community, but don't forget LEGO is first and foremost a children's toy. Anything this complex wouldn't fit in that scheme. But they did provide detailed information about the protocol to make this kind of amazing AFOL work possible. I absolutely love where this is going!! Quote
Bartosz Posted January 21, 2019 Posted January 21, 2019 8 hours ago, Jetro said: LEGO is first and foremost a children's toy. Yeah, just yesterday my nephew (5y old) visited me to play with the trains, he had great time and the remote control was only a curiosity for him. Manual action is all what it was about. And for the adults at play - well, they can write the software on their own just fine, as we can see;) Quote
Giottist Posted January 21, 2019 Posted January 21, 2019 Another point of view: The LEGO train project is a big safety measure! Please imagine what will happen if Vengit shuts down their servers. In this (hopefully not so probable) case all our costly SBricks are electrical waste since we must use the online platform to reconfigure the original app. So with Cosmik42s LTP software we can use all our stuff offline. For my sake in a deep cave, at the south pole accompanied only by penguins or on the far side of the moon. Now I feel much better with the concept. And the LTP solved the problem to use any LEGO motor or sensor stuff in most imaginable combinations, also offline of course. I does not expect something comparable from LEGO itself since I could try their bloated and buggy apps, which are not running on my old smartphone anymore, not to speak about what LEGO apps do with the memory. For a replacement of my old smartphone I could get six (!) more UP hubs. Q.E.D.: LTP saves a lot of money! Please be gentlewomen and men and do not forget to send Cosmik42 a matching donation Quote
Toastie Posted January 21, 2019 Posted January 21, 2019 (edited) 13 hours ago, Bartosz said: And for the adults at play - well, they can write the software on their own just fine, as we can see;) Oh, absolutely ... … when people with the knowledge of @Cosmik42 are around (and - sure - a couple of others - but surely there are not that many, I bet), who spend endless ours in front of their computers, post updates on an almost daily basis, respond to requests within hours, give every iteration away for free … … yes, then it is just fine. But it does not happen that often … and has been the other way around too often. And then: I believe when I company cranks out BLE devices with the capabilities built into these devices as TLG does, they do also target a much more adult crowd, don't they? For pushing a train along, even a motor attached to a dumb battery box is too much. (One example (and there are so many and you know them as I do): The "latest" TLG PF protocol from years ago allowed 16 instead of 8 channels to be operated on. Any updates on that? Not that I know of …) Oh well. It all goes fine at the moment. Let us cross fingers. And I fully support and second @Giottistremarks above! Very well said. All the best, Thorsten Edited January 21, 2019 by Toastie Quote
treczoks Posted January 22, 2019 Posted January 22, 2019 Wow. Very interesting. Sadly, it's running on Windows. Nonetheless, there are some things I'd like to know about this project: a) Does it support the PUP remotes, too? Maybe both for controlling trains and controlling switches? b) Would it be possible to add other devices, too? I'm working on an Arduino Nano based device that offers two motor connectors and a bunch of LEDs and input pins. It will be connected to the "host" via USB UART. c) Would a Linux port be possible? Quote
Cosmik42 Posted January 22, 2019 Author Posted January 22, 2019 19 minutes ago, treczoks said: a) Does it support the PUP remotes, too? Maybe both for controlling trains and controlling switches? Not yet, but I have it in my short list! 19 minutes ago, treczoks said: b) Would it be possible to add other devices, too? I'm working on an Arduino Nano based device that offers two motor connectors and a bunch of LEDs and input pins. It will be connected to the "host" via USB UART. For now I support 'Bluetooth' enabled devices like PUP, SBrick and soon BuWizz. I am talking with 4DBrix to support their USB swiches. So it is totally thinkable to do support more USB devices! 20 minutes ago, treczoks said: c) Would a Linux port be possible? It's in the same bucket as 'Mac OS' port. There is an initiative that helps support cross-platform c# code. I will investigate soon! Quote
Kalahari134 Posted January 22, 2019 Posted January 22, 2019 On 1/20/2019 at 10:54 AM, Toastie said: One thing to consider maybe: It is also fun to play manually with a layout. Sure, automation is tough, challenging and at the same time very rewarding to watch all the activity. And: Many people will want that - its very nice for train shows/exposition etc. I like to push buttons, dials, sliders and control things by myself - but that is just what I do when playing … As someone with an interest in railway signalling, I'd like to see how this could be integrated with a physical control panel. So the trains run themselves obeying the signals set by a human rather than the computer doing everything. Quote
Cosmik42 Posted January 22, 2019 Author Posted January 22, 2019 (edited) 9 hours ago, Kalahari134 said: As someone with an interest in railway signalling, I'd like to see how this could be integrated with a physical control panel. So the trains run themselves obeying the signals set by a human rather than the computer doing everything. I believe LTP can do this already. The idea is to define train paths for specific scenario, for each of your trains. At the end, you are still playing manually with them, but in small scenarios. For exemple => Bring red train from section 0, via section 4, to section 2. Then stop. => That bit is a button you click that will make sure your trains goes where you want it to go. But that's it. To get there, the software make sure there won't be any crash and switches will be aligned to accomplish that path. But you remain in control. You can put the layout in full autonomy, but what's really fun is to trigger all your scenarios on your trains independantly, when you wish so. And you can do just that. Edited January 23, 2019 by Cosmik42 Quote
Toastie Posted January 23, 2019 Posted January 23, 2019 8 hours ago, treczoks said: Sadly, it's running on Windows. >Happily<, it is running on Windows. Very happily. Believe me, I have heard that Windows is the worst kind of operating system in the world. When you ask the experts. I give you that. I do also believe that this is the case. But as an ordinary >dumb< user of MS software - it - works! Like a charm. I like it. Very much. All the best Thorsten 2 hours ago, Cosmik42 said: I don't think you understand my software. That is a little harsh … 3 hours ago, Kalahari134 said: As someone with an interest in railway signalling, I'd like to see how this could be integrated with a physical control panel. So the trains run themselves obeying the signals set by a human rather than the computer doing everything. It appears as if there are two worlds: Closer to the real world - as an everyday public (train) transportation commuter - it appears as if signals mean everything to the driver. In the world of LEGO trains, you can define sections as you wish. So both worlds need to come closer, I guess. All the best, Thorsten Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.