Jump to content

Cosmik42

Eurobricks Citizen
  • Posts

    267
  • Joined

  • Last visited

Everything posted by Cosmik42

  1. This is my dream! Especially as I am working on a generic anti-collision system for trains, so having a map editor would put it even more to life. But being an ex-video-game programmer, I know that this kind of editor can eat a lot of time to make ...
  2. Very cool! Actually I am very likely to drop the 'train' word in 'The Lego train Project' for the word 'automation', because this little project is much wider than that at this point. You have no idea how awesome it is to see this video after so many hours of coding :)
  3. And here it is! V0.4 is out - 01/14/19 Major update includes: - SBrick support - Global code editor You can download the latest build (V0.4) here: https://www.dropbox.com/sh/t4pf1758ewenid6/AABye7-Fnb4QPwvuyuPZm06ma?dl=1
  4. That would be amazing! It's a great idea! I add this to the TODO :)
  5. Sorry @Giottist, I totally missed your post. Yes indeed! You can in fact use everything C# has to offer since the code is fully compiled and executed on demand. This a powerful tool to write complex behaviors and scripts!
  6. Hi Mawe! Thanks for the kind words. I still need to release this SBrick support. Hopefully tonight, if not tomorrow. I don't own an SBrick Plus yet. So I don't support sensor from SBrick just yet. But as soon as I can find a device it will be done! Thanks for following my work. Hope it is helpful to you!
  7. I confirm. Firmware update fixed the issue! We are just few hours away from officially supporting SBrick!
  8. Do I need to update the firmware of the SBrick itself?
  9. Wow. I have a working prototype of controlling motor and lights on a SBrick! The only thing weird is that SBrick abruptly disconnect with me randomly. Did anyone here implement the SBrick protocol?
  10. Synchronizing wasn't the issue, but making the mechanical part. I worked on it yesterday and I have a working prototype inspired by @Giottist link!
  11. So, happy to report we officially support PU lights. Just received a set today and plugged it up for a short test!
  12. Hi everyone, I got a couple TrixBrix switch and I was wondering if any of you have already went through the puzzle of motorizing them efficiently? Thank you! Vincent.
  13. I had to create this behavior because a simple Thread.Sleep was killing sensors reading, async behaviors, etc. Here is what I do: e.CodeToRun.Replace("Wait(", "await Task.Delay(") Maybe!
  14. For this to 2nd Ramp to have any effect, you need to wait for the RampSpeed to Finish like this: Hub[0].RampMotorSpeed("A",25, 75,3000);Wait(5000);Hub[0].RampMotorSpeed("A", 75,25,3000);Wait(3000);Hub[0].Stop("A");
  15. If anyone, it would be you who would know! Thanks a lot!
  16. Again, it's because your default font is much bigger than mine. I will try to find a way to force the size of the font in that label. RampMotorSpeed("A", 0, 1000) should decelerate over 1 second.
  17. So now the 'Wait(6000)' simply stop the execution for 6 seconds while letting any Ramp or other asynchronous things do what they are supposed to do. One last thing. I just did one more upload to try to fix your speed label. From the screenshot you shared I can tell your default windows font size is larger than mine, which is why the speed value doesn't show. I just increased slighted the width of that label. Let me know if that fixes it!
  18. Ooops! I know what it is! Try this new build: https://www.dropbox.com/sh/1tqcy0zuylgdn7p/AAAAwo-mzu5GcqLBRYiDOzNDa?dl=1
  19. Can you copy paste the error and put it in Google Translate into English? Thank you!
  20. Indeed, PU seems to act more like 'float'. For now 'braking' is simply a 'Set Motor Speed to 0'. Maybe there is an official 'Stop'. Will investigate.
  21. Yep It should. Do you have a case where it does not? It's poorly documented, indeed! I will make a full list of properties. The exemple you give failed because of a poor implementation of the 'Wait()' function. I actually fixed it this morning! Could you try again with this version? https://www.dropbox.com/sh/1tqcy0zuylgdn7p/AAAAwo-mzu5GcqLBRYiDOzNDa?dl=1 If this fixes your issue, I will deploy it in the next version. The latest version above actually contains a Ramp with a fromSpeed: public void RampMotorSpeed(string port, int fromSpeed, int toSpeed, int timeinms)
  22. Powered Up. Actually, I wonder if reverting power for a short time would help decelerate faster.
  23. Hi everyone, So when you have a train going full speed and cut its engine, it might be hard to predict exactly where a train will stop. Do you have any idea of 'braking system' to force a train to slow down and even stop? Thanks! Vincent.
  24. Yes it's C#, but you write this directly in my tool. No need for a visual studio.
  25. Mmm ... this should be doable! I'll let you know.
×
×
  • Create New...