Lok24 and Idlemarvel….
So ….. (- per your most appreciated counsel), I re-developed the coding blocks / sequence on one (only !!) project palette, with the net result being that both trains can now be successfully and independently run (!). I have to say that I am quite pleased with this outcome. I’ve learned a lot along the way, plodding through the tech world of ‘coding’, - which although I understand the ‘jist’ of it, isn’t quite in my wheelhouse. But, a thoroughly enjoyable learning experience, nevertheless.
I do have to say that there is one thing that I discovered along the way, which I found both interesting and confounding: After connecting the first Hub to the App (- which appropriately showed up as ‘Hub1’), I then proceeded to connect the second Hub to the App. On doing this, when I endeavored to change to ‘Hub2’ on the selection menu, the ID on the hub coding block just read as ‘Hub’, - with no number identifier. However, I decided to go ahead and give it a try anyway. I first successfully ran engine #1 on ‘Hub1’, and then when I switched to ‘Hub2’, to my surprise, engine #2 successfully ran as well…. (!). It seems strange to me that when trying to enter another Hub ID number on the App, the Hub number doesn’t show upon the coding block. This makes it seem as though 'trying’ to make the switch was a ‘Fail’, which then just causes more ‘Confusion and Delay’ (…a familiar phrase).
I’ve attached a pic of the coding blocks palette for your review….
BTW, I initially tried to do this by including an ‘IfSwitch’ (True-False) Flow block, through which I thought I could apply the logic of: “ If the Hub ID is ‘Hub1', then proceed on the upper path, otherwise proceed on the Lower path (which would then be ‘Hub2’) “ After some time, I gave up, because I couldn’t figure out how to do the requisite Hub identification via one of the ‘Math’ blocks. Maybe you guys can enlighten me on this…. (?)
Next, I plan on exploring adding a ‘Light’ control to one of my engines. Seems like this shouldn’t be too complex, but if I run into any ‘issues’, I’ll be back to you.
Again, many "Thanks!” from a coding ‘newbie’….