Eurobricks Counts
  • Content Count

  • Joined

  • Last visited


About Lok24

Spam Prevention

  • What is favorite LEGO theme? (we need this info to prevent spam)
  • Which LEGO set did you recently purchase or build?


  • Country

Recent Profile Visitors

3618 profile views
  1. Hi I just checked the hub-to.hub communication The idea was to use a "master"-hub and a remote to control two trains with the remote. As the master only uses one channel I submit a user-ID and hub-ID to address the "slaves" Here's the code: MASTER from pybricks.hubs import TechnicHub from pybricks.pupdevices import Motor, Remote from pybricks.parameters import Port, Button from pybricks.tools import wait hub = TechnicHub(broadcast_channel=1) my_remote = Remote() userID = "Lok24" hubID_A = "HUB1" hubID_B = "HUB2" vA = 0 vB = 0 vAold = 0 vBold = 0 while True: pressed = my_remote.buttons.pressed() vAold = vA vBold = vB if Button.LEFT_PLUS in pressed : vA = vA + 100 if Button.LEFT_MINUS in pressed : vA = vA - 100 if Button.LEFT in pressed : vA = 0 if Button.RIGHT_PLUS in pressed : vB = vB + 100 if Button.RIGHT_MINUS in pressed : vB = vB - 100 if Button.RIGHT in pressed : vB = 0 if vA != vAold: hub.ble.broadcast([userID,hubID_A,vA]) wait(100) if vB != vBold: hub.ble.broadcast([userID,hubID_B,vB]) wait(100) wait(10) SLAVES from pybricks.hubs import CityHub from pybricks.pupdevices import Motor from pybricks.parameters import Color, Port from pybricks.tools import wait hub = CityHub(observe_channels=[1]) motorA = Motor(Port.A) userID = "Lok24" hubID = "HUB2" # <<<<< must be different for each slave while True: data = hub.ble.observe(1) if data is None: hub.light.on(Color.RED) else: hub.light.on(Color.GREEN) uID,hID,v = data if uID == userID and hID == hubID: motorA.run (v) wait(100)
  2. Yes, but great improvement of functionality an quality.
  3. Yes, but you loose the load balancing, which is a major advantage with PU. Depends on what you want to archive.
  4. Yes, but on Bricklink they are always available, and much cheaper. Spike Hubs are rechargeable. For others I use rechargeable batteries, which are much easier to handle..
  5. Hi @and_ampersand_and and @BatteryPoweredBricks, Really great work, thanks for the extended version!
  6. Yes, and so they are of the same type. Is everything working now as desired?
  7. Sure, as in the right example there is no controller any more. Concerning "AB": seems that it is only working with two motors with the same ID.
  8. the right one is correct, but indeed: does not work with "AB". With "A" it does. A second block with "B"only added: both motors running. A bug?!
  9. If you tilt the smart device? Please send a pic .... (here it works fine...)
  10. They are No. 2 & 3 from the right
  11. Sure: Motor https://www.bricklink.com/v2/catalog/catalogitem.page?P=bb0959c01&amp;idColor=85#T=C&amp;C=85 Hub https://www.bricklink.com/v2/catalog/catalogitem.page?P=bb0961c01&amp;idColor=86#T=C&amp;C=86 each app. 20 GBP, 5 Motors + 2 Hubs = 140 GBP Add a connecting rod to each motor, thats all.
  12. It would be much easier to use the Powered up motors, no gears needed, programmable behaviour, different scenarios, adjustable speed..
  13. There is no difference, they do the same. But the difference to your picture: You start the program, then you have a motor block which is executed once(!) and then program ends. Which limitations? The one with the rounded ends runs the loop automatically, the other one only starts a motor with desired speed, the purpose ist absolutely different. BTW: the second, steering (with the rounded ends) does an automatic calibration when starting the program, which would otherwise use a lot blocks.
  14. Here is an example for a loop Link: www.werner-falkenbach.de/bricks/Drive.jpg Please let me know if it's visible..... ;-)
  15. Here's link....... www.werner-falkenbach.de/bricks/steering.jpg