Jump to content

vascolp

Eurobricks Citizen
  • Posts

    338
  • Joined

  • Last visited

Everything posted by vascolp

  1. hmmmmm .... and the remote light is steady or it blinks?
  2. If you have a LEGO Remote, you can also try Remote Bla Bla.... It does not need a smartphone.
  3. Here is how I have done it, based on your pictures (it´s fantastic what 10 minutes in stud.io can do!) I didn´t really tested yet, because I don´t have the tires with me... Regarding integration in RemoteBlaBla, I think only two steps will be possible, or else it would complicate to much the code. Building a lever that can handle 3 or more steps (specially more than 3) that will be quite a chalange!
  4. Very cool! I must get my old classic space tires.... or even older ones like these, they might work too:
  5. I don't have those tires with me at the moment so I tried with this. Kinda works but... I suspect the three steps will be a bit difficult, though... Here is a simple test program. Just connect a motor to port A. from pybricks.pupdevices import Motor, Remote from pybricks.parameters import Port, Button #from pybricks.tools import wait m = Motor(Port.A) print('connect remote...') remote = Remote() prev_pressed=() while True: pressed = remote.buttons.pressed() if prev_pressed != pressed: print(pressed) prev_pressed=pressed if Button.LEFT_MINUS in pressed: if Button.LEFT in pressed: m.dc(100) else: m.dc(50) elif Button.LEFT_PLUS in pressed: if Button.LEFT in pressed: m.dc(-100) else: m.dc(-50) else: m.dc(0)
  6. Wow, thats a crazy idea! Actually it might work, it deppends a little on the quality of the input generated by your construct. If its really stable it shouldn't be very difficult!. I could even imagine 3 steps ([Plus], [Plus,Red], [Red comming from plus side]...) If I have some time I will try your idea... but I can´t promise any timings...
  7. And also: if you flash a specific program to the lego hub, say to control 42100, using some mobile phone or computer app that later is discontinued, the hub will not be able to be reconfigured, thats true, but you can still play with it forever at least with 42100... But there are other issues for LEGO to consider... for instance it might be easier to find an android/ios developer than a developer to the hub platfom.
  8. Hi! It seems to me that you are comparing a physical remote with a mobile phone (this is, a computer). But there is no need for that, TechicHubs and CityHubs are full blown computers by them selfs. What they lack is a general purpose input device to play with (much like a keyboard or mouse). What is needed is a physical remote control with a few more buttons, some of them with proportional control, preferably able to connect to two or more hubs at the same time. You would still need a standard computer or a mobile phone to configure the hub (that is, to download the apropriate program to it), but then a hub is able to play completely standalone. This physical remote would have to have a very good design to make it useful in many different cases, but the end product wouldn´t be too complex, I guess. Regarding your example with 42100... I guess you are right, the intelligence is on the phone... but this is the option LEGO followed. It is not the only option. Take a look at PyBricks for instance, the intelligence can completely be in the hub. That said, I don´t know what´s in LEGOs mind :-)
  9. Thats really odd... I had no problems with CityHub last year... but in the meantime I changed my laptop! And now I was able to flash LEGO firmware... but it wasn´t with the laptop but with the phone! So I just tried to run beta.pybricks.com in the phone and... voila! I could flash it! @BatteryPoweredBricks thanks for your help! My old laptop had Bluetooth 4.2 and the new one has Bluetooth 5.... it seems consistent with your problems yes. However, my phone is a pocophone F1 (about 4 years old) , which has bluetooth 5.0, and it works.... So it seems that most recent devices can not flash CityHub?? Anyway, RemoteCityBla.py seems to work fine in the new pybricks beta version (as long as you delete the "from math import trunc" line). That's cool!
  10. Help! Everything works fine with TechnicHub. But with CityHub I cannot flash any pybricks firmware. Tried with the two CityHubs I have, with beta.pybricks.com and code.pybricks.com and always the same result: existing Firmware is deleted and I get a The hub was disconnected before flashing was completed. Restart the hub and try again.. After this, the hub has no firmware so it enters immediatly the purple blinking mode. I can try to flash again but always with the same error... If I try with powered up app, I can restore LEGO firmware with no problems... Any hints? Thanks in advance!
  11. Not quite... In the latest version: ('technichub', '3.2.0b4', 'v3.2.0b4 on 2022-10-21'), RemoteBlaBla needs a litle change... delete the following line (line 51 in RemoteBlaBla.py). from math import trunc But then, it seems to work fine... although I have not done serious testing, just connected one motor...
  12. Hi! I just tested the new firmware version ('technichub', '3.2.0b4', 'v3.2.0b4 on 2022-10-21'). Tried the storage stuff with a TechnicHub, it seems to work fine! But got some "GATT unknown error" when doing nasty things like removing bateries while on. After removing the bateries, puting them back, reconnecting to pybricks and running the program, it gave me this error. Tried it also with RemoteBlaBla. It does not work immediately because the line: from math import trunc is not needed anymore. But after commenting it, it seems to work very well! No need to flash it just use it! I also want to try RemoteBlaBla in a CityHub because it is very memory demanding... but... no charged AAA bateries... maybe tomorrow. BTW, I was initialy mislead by your post with data/size storage() arguments while they really are read/write... maybe you can edit it...
  13. Took this from the manual, maybe it helps: You can test Remote Bla Bla under the pybricks interface, but its true power happens when you include it in your TechnicHub firmware. By doing so, you will have a configurable standalone device which you can configure according to your needs. Note: if you include Remote Bla Bla in your hub firmware, and turn off the hub completely (this is, no blinking lights) when you connect it back, you might need to click twice to start Remote Bla Bla. First click turns on pybricks, (blue blinking light), second click starts Remote Bla Bla (white blink light asking for remote).
  14. Did you install the firmware in your hub, including the program (RemoteBlaBla program)?
  15. Seems very cool, really what I needed. Seems very cool too!!! Waiting to undertand this better... does it means that I have to call some function to save the current program or it will be saved "automagicaly"? So, I am in the IDE front end, write and test some program, [do something to save it] and turn everything off. In the other day I connect to the hub, and the IDE will show me the program stored in the hub instantly? This seems particularly useful in the development cycle of bigger apps! Oh more questions... I struggled a lot with the lack of space of the CityHub. How does these features will affect the available space? I supose 128 bytes is 128 bytes less but a program is a bit bigger... RemoteBlaBla for TechnicHub is a 47kb source file and for CityHub it is 27kb... Do you save source code or compiled code only?
  16. Oh that motor. I don't have one but they seem pretty cool.
  17. The new clutch is composed of two unmounted plastic parts. The old one is two plastic parts, a metal part and mounted. I gess, in Lego perspective, the new one has some advantages... sorry for continuing the off-topic :-) On topic: your idea of using the light bricks is very cool! Hope you can manage where the micromotor is. The arm is small, but maybe you can have a motor inboard and carry the movement up until the solar panels with axles...
  18. I agree with you... Maybe only a reference to the shock absorber with tight coils?
  19. You are pretty close! You can get two or three more with this query on bricklink: bricklink
  20. Hi everybody, When I saw this thread some days ago I played a litle with the idea, trying to do it with the parts I have. Yesterday I continued playing and did this (careful noisy!) : The parts: One drawback might be the usage of a String with End Stud and Bar 1L, 13L Overall. I have one that I got in some used lego lot... I didn´t now they were so expensive. Hope you like it!
  21. Cool! I am currently living with the 14 bytes of the remote but only with a lot of enconding. 128 or 256 bytes seems enough for most cases I think.
  22. There are lots of examples. You can, for instance, peek this zetros example and remove the stuff related with steering and locking. Since you want the motors in the opposite direction, change the creation of one of the motors to: drive_motor2 = Motor(Port.B, Direction.COUNTERCLOCKWISE) You could also try my Remote Bla Bla which allows you to configure a hub without a mobilephone. But you will need a TechnicHub even to configure a CityHub (not enough memory on the CityHub...).
  23. Ok thank you. That seems indid the correct approach. I will start to use those values. Currently only on beta version, right?
  24. Cool, thats an improvment! I just tested for the two motors I have at hand: I get: pybricks: 47 - Technic Control+ XL Motor:1525 76 - Technic Large Angular motor: 970 The values I used were 90% of philohome no-load characteristics, which are: 47 - Technic Control+ XL Motor: 1980 (330*6) 76 - Technic Large Angular motor: 1278 (213*6) What is the rationale of your values? Note, I am not telling that my rationale is better (on the contrary as I have no way of mesuring speeds). Just trying to learn. Thanks!
  25. Good question! I think there is no generic solution for that. I do it like this (using excelent Philo stuff!): # Mode _bla_STP_SPEED assumes maximum speeds for each type of motor. # There are lots of motors, each one with its own characteristics, which makes it a bit difficult # to have a general purpose thing... # I got no-load speeds in https://www.philohome.com/motors/motorcomp.htm, multiplied by 0.9 # and got a list of maximum speeds per device. If the device does not match... it uses 1000deg/s (why not?). # # 1 Powered Up Medium Motor # 2 Powered Up Train Motor # 38 BOOST Interactive Motor # 46 Technic Control+ Large Motor # 47 Technic Control+ XL Motor # 48 SPIKE Prime Medium Motor # 49 SPIKE Prime Large Motor # 75 Technic Medium Angular Motor, gray # 76 Technic Large Angular motor, gray devs_max_speed = { 38:1377, 46:1700, 47:1780, 48:1230, 49:1150, 75:1230, 76:1150 } I got the above list of id numbers somewhere from pybricks github stuff, but I can´t find it right now ... You can get that id number from a port by doing: PUPDevice(Port.A).info()['id'] So, to get a device maxium speed on Port A I do: s=devs_max_speed.get(PUPDevice(Ports.A).info()['id'], 1000) Hope it helps!
×
×
  • Create New...