Raspberry Pi Build HAT – Controls Lego Technic motors and sensors
raspberrypi.com
raspberrypi.com
There's not even any features like Mindstorms that offer customization/programming, it's literally just a clunky touchscreen remote that doesn't pair with the model half of the time. I guess phones on the box sell better.
For example, a simple remote is super easy to do. A complex behavior config (like steering boxes) or calibration modules could be small plugins into a remote so you keep it with your instruction/set. They could be also remotely programmed and injected there.
SO many ideas how to do this correctly with the original LEGO mindset.
The real ugly part with the smartphone requirements is it targets pretty recent OS versions (too old hand me downs are out of the picture), and outside of the top end education hubs ($200+) there is no obvious way export/import/backup the programs.
Having a kid invest time to make anything a bit complex on them is a recipe for disaster.
Sadly jumping from the block oriented programming to "real" programming of the Hitachi H8 microcontroller was not very straight forward, so I kind of hit a wall in that regard. Maybe this collaboration will act as a better gateway to "real" programming.
That said, microcontroller programming is something very specific in the sense that the same thing might (and often is) programmed in a completely different way on another device, so basically a large part is just getting to know your hardware. Fortunately, these days several abstraction layers are available for people who need them, from MicroPython to FreeRTOS.
If I actually wanted to use a block language at my day job I'd want affordances for larger, more complex programs. Compiler or JIT, copy/paste, zooming in and out of parts of programs (ala Prezi or something), integration with source control diff tools, C extensions / integration with existing code, console output, file I/O, etc.
It could do absolutely everything that Lua could do. We also added a kind of multifile support, using tabbed views to reimplement libraries on the browser side of things (compiling into separate Lua files).
The idea was that educators at both ends of the spectrum could convert to and from the same visual representations. The primary school classes the uni were running could use blocks, and slowly move to normal Lua, one feature at a time, all the way up to the first and second year ICT programs for higher ed.
Because it could compile to Lua, we could use git and a whole bunch of other tools that already exist. There was an experimental C/asm.js branch to add in FFI support, but that was deemed too time-costly whilst the rest still had a bunch of edge-cases.
And then, unfortunately, the whole program got yanked. But about that time it was close approaching what I would consider "useable" for actual real work.
https://projects.raspberrypi.org/en/pathways/lego-intro
They're exclusively written in Python, some of them using Bluetooth for remote control, some using pollution APIs to display data and also TensorFlow for image recognition.
PLCs have historically used ladder diagrams, which are also not 'code'. I've seen Excel spreadsheets that you would have been hard pressed to replicate using code.
Programming in its very essence is telling a machine what to do, what form that comes in isn't all that relevant, and code is just one of those forms.
'actual code' is not a requirement for programming.
Jesus, that is what I call a trip down memory lane! I wonder what happened to my RCX.
https://projects.raspberrypi.org/en/pathways/lego-intro
Feedback would be very gratefully received.
I assume this will work with the poweredup motors. The poweredup motors and sensors all use the same pinout, cable and serial protocol.
[1] https://lego.github.io/lego-ble-wireless-protocol-docs/index...
There have been third party hubs to pilot Lego Technic motors for a while now, but this HAT is a lot cheaper than any of them (TBF it doesn't work the same either, with no battery, button or physical casing etc.), works with the latest batch of motors, has official blessing, and the RPi is also a lot more extensible and flexible on every aspect.
This is a no brainer purchase for anyone trying to do more things with Lego Technic in my opinion.
This allows them to quickly follow trends but it is totally contrary to the mechanical interface which is backwards compatible for over 60 years.
The same goes for the train sets, the track width is more or less the same for ever but the track interconnects and the way the trains are powered have changed often.
Fortunately for the trains there is a solution (subset of track, only use the old 12V system for the track it will also support battery powered trains giving a reasonably broad coverage), but for the electronics and the various motors the situation is quite a bit more complex. Note how the article essentially limits compatibility to a single one of the 10 or so systems that Lego has over the years used to connect electrical components.
Anybody remember the very old style electrical interconnect plates?
Someone ought to cook up a compatibility kit that allows you to connect older and newer stuff at will.
There is 'duplo' and there is 'Modulex':
https://www.newelementary.com/2017/11/old-bricks-what-are-mo...
It's fun to build large structures quickly with Duplo then detail them with Lego!
Which allows you to take that strategy to the next level.
Only sold from 2004–2006, but still in high demand on the used market. Interlocks with Duplo and regular Lego.
Lego's stewardship of all this was a mess, and I'm super glad they open the system to officially blessed third parties.
"While these initiatives are a wonderful start into the exploration of these four areas of study, the critical process of creativity and innovation is missing. Students in STEM programs may have more experiential learning opportunities, but they are limited to only science, technology, engineering and math. Our economy requires so much more than an understanding of these areas – it requires application, creation and ingenuity. STEM alone does not foster these essential nutrients."[1]
It reads weirdly for me, because the people I know in STEM are some of the most creative people I know. Very much my own biased opinion, but adding Arts into STEM seems to ironically exclude art from the other subjects, and gives a space for all those art-focused people (I sometimes avoid at hack-a-thons because they don't like coding things) to feel included rather than encouraging them to learn STEM?
1. https://artsintegration.com/what-is-steam-education-in-k-12-...
I don't know if I agree with the second point about excluding arts people, it sounds like you want them to be forced to learn STEM, which I don't agree with. Let people let what they want to learn, but STEM by definition could not exist without creativity.
There is also "STEAMS" STEAM + Sport, which makes no sense to me.
Eventually, it includes literally everyone and means nothing at all.
His focus at the MIT Media Lab was teaching artists and designers to program, and my understanding is that he continued that as the president of RISD, so it definitely was not intended as an acronym to convince art/design folks they didn't need to learn STEM.
I also never personally interpreted the attempted inclusion of Art as implying a lack of creativity in the other domains any more than the inclusion of Math implied a lack of mathematical aptitude in the other domains.
I still have the bricks, motors and sensors! (I even still have the RCX and the weird infrared thing you use to program it). This is going to be a fun project for my daughter and me, especially since the Pi is way more flexible than the RCX.
There are people all over that don't know the value of LEGO bricks and will sell the incredibly cheap. Check garage sales and Facebook marketplace and you will find deals quick.
https://makezine.com/2013/04/23/beaglebone-lego-motor-contro...