Jump to content

Rugged Approach: Using several bricks of same type


Recommended Posts

Dear List

I am using the Rugged Approach approach for programming in C# and in Python. It just works perfectly! Thanks for the great tutorial.

Till now, I worked with many bricklets, but each of a different type. For this case, the approach and code in the tutorial works like a charm.

Question:

  • But what would be the best-practice, if you have several bricklets of the same type?

Of course, I could use the UID of the individual bricklets to make the differentiation of the individual bricklets. But I would like to avoid the usage of the UID in Rugged Approach for several reasons:

  • Lost of the very generic procedure of the Rugged Approach introducing somehow hard-coded UIDs of bricklet.
  • Incompatibility of several installations of hardware having different UIDs.

In the specific application I am working on, the bricklets are connected with a HAT Brick.

Question:

  • Is there a possibility to avoid the UIDs?
  • Could I use the information of the ports were each of the bricklet is connected to? In this case, I have to make sure, that each bricklet is connected with a well defined port. An approach which could be realistic. The information of the port connected to would be based on the return value of the get_identity() function of each bricklet.
  • If I would use the UIDs, is it reasonable/possible to change the UIDs of the individual bricklets to have the same UIDs of the bricklets in each identical installation of the hardware.

Looking forward to any ideas and suggestions.

Cheers,

Yvo

Link zu diesem Kommentar
Share on other sites

Hi Yvo,

I think the best way is the position of the bricklet. So you have to plug the bricklets to the same positions and you can identify them with the enumeration callback.

It is also possible to override the UID with the Brick Viewer, but for this you have to connect each bricklet and override the UID.

I think first way is better because hardware is like it is. It is more plug and play (work) :)

Greets

Chris

Link zu diesem Kommentar
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...