Cosmik42

Control all your Powered Up & Power Function (SBrick) devices with a single software

Recommended Posts

Just now, mawe said:

Any external program can be integrated with it

My first thought is Philips Hue.

Share this post


Link to post
Share on other sites

Hi Vincent & all,

as you see my approach was quite different from yours. But works brilliant whe speed is not to high.
Which is useful if the table is not longer than 1,80m

Now I'm trying to do some funny things with the handheld, too.
I'd like to run a motor as long as the button is pressed....

Two ways:
There's an event "OnHub Butto X onPort Y  is released"

or in global:

do
{
} while Hub[0].Button("XY"). IsPressed

But what is if some event comes during loop?
 

This would allow a brillant usage of LTP for the Control+ evacuator with two handhelds or even one with two levels!!

And how to switch colors?
I put the "enum colors" into global and then

Hub[0].SetLEDColor(colors,3);

That's pretty wrong, but SetLEDColor needs two argumenst, doesn't it?

Edited by Lok24

Share this post


Link to post
Share on other sites
On 2/6/2019 at 8:31 AM, Jade124 said:

Once we have support for this I'll be buying some for sure :wink: loving the idea of 3rd party lights 

You and many others I’m sure!

Which is exactly why it’s short sighted of them. Some companies are like that I guess..

 

Never mind - I’ve sent a PFx kit to Cosmik so we should soon have it supported. Can’t wait to see what he does with it :)

Share this post


Link to post
Share on other sites

Hi everyone, 

I had to travel for the last 2 days and will catch up with all your messages soon.
Just shot a short video showing 4 LEGO technologies all talking to each others!

Will be back soon.

Share this post


Link to post
Share on other sites
5 hours ago, ElectroDiva said:

Never mind - I’ve sent a PFx kit to Cosmik

Well done! After visiting their website it sounds like they are very busy working to get orders completed and sent out. 

Share this post


Link to post
Share on other sites

@Cosmik42 another random idea for the project, using xbox bluetooth remotes could add an interesting dimension to the control capabilities, so many buttons on just one device :) 

 

PSX_20190208_082754.jpg

Share this post


Link to post
Share on other sites
13 minutes ago, Jade124 said:

another random idea for the project, using xbox bluetooth remotes could add an interesting dimension to the control capabilities, so many buttons on just one device :) 

Dear all,

oh yes - I believe @Cosmik42 can add virtually every BT/BLE device to the list of devices supported by his fantastic software.

What I would like to suggest: Where are we heading with all this? Get a million of devices supported and then what? @Lok24 is full into autonomic workflows; in contrast, a device with a zillion control buttons wants to interact directly with the BLD devices. Or with workflows.

As of now all BLE servers can talk to the client, the client does all the work and the serves do just that: Serve. Is there a plan or is this just going ballistic? It is fine with me when a software can do it all, but then it may quickly become cumbersome to work with it, depending on your personal needs.

Oh well, just my 2 cents.

All the best,
Thorsten   

Share this post


Link to post
Share on other sites
32 minutes ago, Toastie said:

Where are we heading with all this?

@Toastie I understand your point of view, and I hesitated even suggesting this to start with. My position is that I intend on using LTP to control my entire city layout - which is very heavily train based - and this software is the missing link. For me, not everything will be fully autonomous, so having forms of input is important. IMO it is of benefit to have an input that has variable speed, multi direction input controls, so this is why I decided to suggested this.

Xbox one remotes are very common, made by Microsoft, so the chances of easy integration via an API hopefully would make the job easier than it otherwise would be :innocent2:

Share this post


Link to post
Share on other sites
54 minutes ago, Toastie said:

Where are we heading with all this?

Proper analog controls. Something that LEGO as well as the BuWizz and SBrick guys should have implemented right from the start. Ever tried to control a car like a modified 42056 Porsche GT3 RS with LEGO's official PF and PU remotes?

Share this post


Link to post
Share on other sites
Just now, 3797 said:

Proper analog controls. Something that LEGO as well as the BuWizz and SBrick guys should have implemented right from the start. Ever tried to control a car like a modified 42056 Porsche GT3 RS with LEGO's official PF and PU remotes?

Or even the poor old RC Tracked Racer - 42065

For me it will be to control the Train Crane Car MOC I'm currently working on :grin:

Share this post


Link to post
Share on other sites
10 hours ago, Toastie said:

It is fine with me when a software can do it all, but then it may quickly become cumbersome to work with it, depending on your personal needs.

@Toastie, actually here is the good news: adding device does not add any complexity. Just more possibility. The reason is simple:

  • Hardware discovery is UI-less. So more hardware does not equal more buttons.
  • All hardware fit under the same mold: a hub with ports. You can see here the very long term thinking of LEGO and how all these devices have 100% similar way of thinking.
  • My top-software layer has not changed a bit or had for a particular device. Nothing is 'hard-coded'. Everything falls together beautilfully.

However you make a good point as of 'where this is going?'.
It looks to me more and more that this software now goes way beyong train enthusiast and could be used by almost any LEGO automation enthusiast. 
I am considering renaming it "The Lego Automation Project" to better reflect that possibility.

10 hours ago, Jade124 said:

@Cosmik42 another random idea for the project, using xbox bluetooth remotes could add an interesting dimension to the control capabilities, so many buttons on just one device :) 

I don't own this hardware unfortunately.

Edited by Cosmik42

Share this post


Link to post
Share on other sites
On 2/7/2019 at 9:04 AM, Lok24 said:

There's an event "OnHub Butto X onPort Y  is released"

This is the easiest way and actually this event exist! I just did not see a scenario ... well you just found one :) Will add it shortly.

Share this post


Link to post
Share on other sites

Hi @Cosmik42

brilliant. As you see,here are some users who don't use a complete automatic, and therefore this would be useful.
I'd like visitors to drive themselves on exhibitions.....

I' going to post two very short videos today shwowing this usage if handset and train motors.

(There are my two wustuions concernig Wiat() in global and SetLEDColor, if you find the time, thanks..:)

Renaming your software: be aware the sometimes TLG is not amused when anyone else uses the brand "LEGO"

 

Share this post


Link to post
Share on other sites
On 2/7/2019 at 9:04 AM, Lok24 said:

And how to switch colors?
I put the "enum colors" into global and then

Hub[0].SetLEDColor(colors,3);

It should be Hub[0].SetLEDColor(Colors.BLUE);

As for Wait in global, you need to add the keyword 'async' to your method declaration. Otherwise the wait cannot work.
 

public void async MyGlobalFunction()
{

}

 

1 hour ago, Lok24 said:

Renaming your software: be aware the sometimes TLG is not amused when anyone else uses the brand "LEGO"

Even for a free project? 

Edited by Cosmik42

Share this post


Link to post
Share on other sites

Hi, I'm doing something wrong.

I tried now:

Hub[0].SetLEDColor(Colors.BLUE);

Compiling failed.
Error (CS1502): The best match for the overloaded 'LegoTrainProject.Hub.SetLEDColor (LegoTrainProject.Port.Colors)' method has some invalid arguments.
Error (CS1503): Argument '1': Unable to convert 'LegoTrainProject.DynamicCode.Colors' into 'LegoTrainProject.Port.Colors'.

Global is:

public enum Colors
{
    BLACK = 0,
    PINK = 1,
    PURPLE = 2,
    BLUE = 3,
    LBLUE = 4,
    CYAN = 5,
    GREEN = 6,
    YELLOW = 7,
    ORANGE = 8,
    RED = 9,
    WHITE = 10
}

 

And:

public void async MyGlobalFunction()
{
// .....
}

Compiling failed.
Error (CS1002): ; erwartet.
Compiling code ...
Compiling failed.
Error (CS1002): ; erwartet.

("erwarted = "expected")

 

 

Edited by Lok24

Share this post


Link to post
Share on other sites
On 2/6/2019 at 10:27 AM, Lok24 said:

 

Simply remove the Enums declaration. This Enums already exist and you are simply doubling it.

Share this post


Link to post
Share on other sites

Here are two short videos (30sec.),

one is showing how to get two motors in a train running in different directions

second is how to toggle a switch or signal  with only one(!) button each , so you could access seven accessories with one handheld (or use the power button to switch to train or next six switches...)

 

Edited by Lok24

Share this post


Link to post
Share on other sites
9 hours ago, Cosmik42 said:

 

9 hours ago, Lok24 said:

Renaming your software: be aware the sometimes TLG is not amused when anyone else uses the brand "LEGO"

Even for a free project? 

Yes, they do. The legal department is, well, a legal department, and they have shown just a few weeks ago with "Held der Steine"  that they follow the legal tradition of "one hammer fits all".

Better be careful here. We like you, and we want to keep you around.

Share this post


Link to post
Share on other sites
52 minutes ago, Lok24 said:

Oh that's a great resource. And as much as my software is ok, my FB group is not because of the logo use.
As for the name of that software, it looks like I need to use the Lego name as an adjective.

For exemple 'The Lego Bricks Automation Project' would be correct as long as I add:
LEGO®is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this site

But maybe you guys have suggestion on how we should name this software?

Share this post


Link to post
Share on other sites
4 hours ago, Cosmik42 said:

The Lego Bricks Automation Project

TLBAP

Or perhaps "Lego Bricks Automation Project" LBAP?

Or even shorter "Brick Automation Project" BAP?

Share this post


Link to post
Share on other sites
5 hours ago, treczoks said:

Better be careful here. We like you, and we want to keep you around.

Yes, better be careful!

But: "... we want to keep you around": I believe this is phrased a little from the top.

I believe that @Cosmik42 is making a true change here. So many folks (including me!) have tried to get around the limitations of 4.5V/9V/12V/RC/PF. Arduinos everywhere, 4DBrix WiFi, SBricks, BuBizz, and so on and so forth. Documenting that we were in desparate search for custom solutions. Now all of a sudden - and believe me, I am sure that TLG did >not< foresee that, @Cosmik42's software makes a >complete< difference.

For one, there is this "turn-on-server - client recognizes it" thing, evaluating who is there and what can be accomplished. For two there is a full blown custom programming environment.

We as a group together would be encouraged, happy, promoted, proud, if @Cosmik42 continues to drive this forward. Because he >is< we. It makes a very big difference to me.

And: TLG better pays very, very close attention to this. Not the f*ing legal department. No. The innovation and future development department. I hope they copy.

As for a name of the software: How about "The PF2 Software Integration Project"? I' d say >proudly< leave out the TLG Logo/Name/Legal fuss. Everyone interested will know what is going on.        

All the best,
Thorsten  

   

Edited by Toastie
wrong citation

Share this post


Link to post
Share on other sites
Just now, Toastie said:

I' d say >proudly< leave out the TLG Logo/Name/Legal fuss. Everyone interested will know what is going on

Agree - we all know what we are using it for :)

Share this post


Link to post
Share on other sites

How about “Brick Automation Project” or just “CosmikSoft”.

 

As others have said, those who need it for their projects will search it out regardless of whether it has Lego in the name.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.