MasterOfGizmo hat geschrieben: ↑14 Mär 2022, 13:56
You don't need anything between the TXT and the LEGO controllers for this. The TXT is able to directly interface to bascially all the LEGO controllers, either via USB (e.g. to the Spike Hubs) or via Bluetooth (to the Technic and City Hubs). And also all older LEGO controllers like the Boost, WeDo 2.0 or WeDo 1.0 can be connected directly.
See e.g. this:
https://www.youtube.com/watch?v=Y1m1k-_eHNk
The current LEGO UART protocol is documented at several places like this one:
https://github.com/pybricks/technical-i ... 268dd268ba
What protocols are you going to analyze? IMHO everything is already documented.
Your indicated links mainly concern all older LEGO controllers. The protocol of the Mindstorms 51515 or the Spike inventor differs thoroughly with all older sets like: WeDo 2.0 or WeDo 1.0 . Lego's official documentation on this is still quite limited. Most of the information comes from reverse engineering that a few have done.
Philo's homepage:
https://www.philohome.com/
https://github.com/maarten-pennings/Leg ... ms4/faq.md
https://docs.pybricks.com/en/latest/hubs/primehub.html
On my FPGA, I do not have direct access to Bluetooth, nor do I have the knowledge to implement it. However, I have a tremendous amount of I/O and that is exactly the point where the new Lego hub just has nothing. Everything is focused on their robot and its many applications such as line followers, color and distance sensing and built in a small space. Their flat cables are fixed length 25 cm, so extremely short. They do not yet provide extension cables and their connector is Lego property. You cannot connect any old version of sensor or motor into the hub. Now everything is also internally at 3V3 where before it was 5V. The motor PWM levels are the same though. The new motors do have an absolute encoder (of 360 degrees) with a relative position value next to it. This is also completely different than the old motors.
Lego and Fischertechnik, both have made innovations that have always appeared too early due to marketing. The product is not completely finished but we must look to the future with confidence. Software has been updated and is mostly still in beta phase. I expect it will be temporary. We have to accept this.
With my existing FPGA module, I want to make the two systems, FT and Lego, to work together. With the FPGA I have the ability to listen to all 6 hubs of lego and record the data without writing 1 letter of code on the Lego side. The delay in doing so is negligible. I can easily make trigger points for the scope. This is useful when running the software. You can measure all kinds of measurement delays. Also command like Bluetooth, serial, sensors etc. Bluetooth is used between the hub and the PC and also with the PS4 remote control. Soon I will be able to make a demo with Lego and FT where that PS4 is also used.
To use commands in either direction between FT and Lego I am going to use a serial line on hubE. For this I have already written all the code along both sides. I have already tested this and it works perfectly. There will be a small video of this soon though.
The TXT Controller is ideal for use as a GUI. All the software exists for this. Attaching the Lego side is not that difficult. Now I can put all the data values of the Lego hubs on the big PC screen. This is real time data. Vice versa you can also place buttons and sliders on the PC screen as commands for the Lego, also Led status.
As you can see there is a lot to measure. For this new Lego hub there is still a lot of updating to be done.
I believe in these new products and will try to use them. My dream now is to make a meaningful larger project that fully utilizes both systems.
Frans.
------ Added by Moderator Ralf (Translation by deepl)
Die von Ihnen angegebenen Links betreffen hauptsächlich alle älteren LEGO Controller. Das Protokoll des Mindstorms 51515 oder des Spike Inventors unterscheidet sich durchaus mit allen älteren Sets wie: WeDo 2.0 oder WeDo 1.0 . Die offizielle Dokumentation von Lego zu diesem Thema ist noch recht begrenzt. Die meisten Informationen stammen aus dem Reverse Engineering, das einige wenige durchgeführt haben.
Die Homepage von Philo:
https://www.philohome.com/
https://github.com/maarten-pennings/Leg ... ms4/faq.md
https://docs.pybricks.com/en/latest/hubs/primehub.html
Auf meinem FPGA habe ich weder direkten Zugang zu Bluetooth, noch verfüge ich über das Wissen, um es zu implementieren. Allerdings habe ich eine enorme Menge an E/A, und das ist genau der Punkt, an dem der neue Lego-Hub einfach nichts hat. Alles ist auf den Roboter und seine vielen Anwendungen wie Linienverfolgung, Farb- und Entfernungsmessung ausgerichtet und auf kleinstem Raum untergebracht. Ihre Flachkabel haben eine feste Länge von 25 cm, sind also extrem kurz. Sie bieten noch keine Verlängerungskabel an und ihr Stecker ist Eigentum von Lego. Sie können keine alten Versionen von Sensoren oder Motoren an den Hub anschließen. Jetzt ist auch alles intern auf 3V3, wo vorher 5V waren. Die PWM-Pegel der Motoren sind jedoch die gleichen. Die neuen Motoren haben einen absoluten Encoder (von 360 Grad) mit einem relativen Positionswert daneben. Das ist auch völlig anders als bei den alten Motoren.
Lego und Fischertechnik, beide haben Innovationen gemacht, die aus Marketinggründen immer zu früh erschienen sind. Das Produkt ist noch nicht ganz fertig, aber wir dürfen zuversichtlich in die Zukunft blicken. Die Software wurde aktualisiert und befindet sich größtenteils noch in der Betaphase. Ich gehe davon aus, dass dies nur vorübergehend sein wird. Das müssen wir akzeptieren.
Mit meinem bestehenden FPGA-Modul möchte ich erreichen, dass die beiden Systeme, FT und Lego, zusammenarbeiten. Mit dem FPGA habe ich die Möglichkeit, alle 6 Hubs von Lego abzuhören und die Daten aufzuzeichnen, ohne einen Buchstaben Code auf der Lego-Seite zu schreiben. Die Verzögerung dabei ist vernachlässigbar. Ich kann leicht Triggerpunkte für das Oszilloskop erstellen. Das ist nützlich, wenn die Software läuft. Man kann alle Arten von Messverzögerungen messen. Auch Befehle wie Bluetooth, seriell, Sensoren usw. Bluetooth wird zwischen dem Hub und dem PC und auch mit der PS4-Fernbedienung verwendet. Bald werde ich eine Demo mit Lego und FT machen können, bei der auch die PS4 verwendet wird.
Um Befehle in beide Richtungen zwischen FT und Lego zu verwenden, werde ich eine serielle Leitung am hubE verwenden. Dafür habe ich bereits den gesamten Code auf beiden Seiten geschrieben. Ich habe dies bereits getestet und es funktioniert perfekt. Ein kleines Video davon wird es aber bald geben.
Der TXT Controller ist ideal für den Einsatz als GUI. Die gesamte Software dafür ist vorhanden. Das Anbringen der Legoseite ist nicht so schwierig. Jetzt kann ich alle Datenwerte der Lego-Hubs auf den großen PC-Bildschirm bringen. Das sind Echtzeitdaten. Umgekehrt kann man auch Knöpfe und Schieberegler auf dem PC-Bildschirm als Befehle für das Lego platzieren, auch Led-Status.
Wie Sie sehen können, gibt es eine Menge zu messen. Für diesen neuen Lego-Hub müssen noch viele Aktualisierungen vorgenommen werden.
Ich glaube an diese neuen Produkte und werde versuchen, sie zu nutzen. Mein Traum ist es nun, ein sinnvolles größeres Projekt zu machen, das beide Systeme voll ausnutzt.