I got inspired the other day watching the season finale of LEGO Masters. Other than seeing some truly inspiring LEGO builds, what really caught my eye was that one of the builds used a colour-sensor in it to rotate a piece of the build.
So, as it turns out, I happen to have a LEGO EV3 (and an older LEGO NXT) and felt it was time to wipe the dust of it. So began my days adventure.
I enlisted the help of my 11 year old son, and we had a simple goal: build a Rock-Paper-Scissors game using the colour sensors we have.
You can see in the picture that we had built with precision six blocks - one red, one grey, one white, to take the place of the various rock-paper-scissors actions. We were well on our way to LEGO stardom, I was sure.
To add to the sheer level of Geek, I decided that we needed a fun way to identify the winner. I have the old Lootbox robot and we thought that raising the arm of the side of the winner would work. I had originally wanted to place the motors inside this cardboard box, but there really wasn't enough space on the inside to work, so we improvised and built a contraption to go around the outside.
We spent a couple hours fussing with the sensors. I even got my 18 year old son to come out and troubleshoot with us. Ultimately, we decided that the sensors were simply not precise enough; they would routinely mis-identify colours or not identify a colour at all. So we had to improvise again: it was time to break out the IR sensor and the buttons. My son got to break out some awesome LEGO skills to build an enclosure for the IR sensor.
I was much more simple with the buttons.
The final construct looked pretty cool, if I do say so myself. It was fun putting it all together.
My son did all the coding in the Mindstorms app. The new version of the Mindstorm's tool is actually based on Scratch, which was really neat to see. A lot of schools teach Scratch as an introduction to computer science and programming, so it makes sense for LEGO to use the same interface. I also discovered while researching it that there is also an official OS for the robot that will allow it to be programmed in Python. Now that made my day. I might take this same construct that we put together today to begin to teach him Python.
And for the final test! We see success.
There are definitely ways I have seen to improve the coding and the building; the important part, however, is that we got to do something creative and that my son did all the programming himself. That made me happy to see. I might simplify it and remove the Lootbox to make modifications easier, but the nerd in me is happy with the day's project
(c) All images and photographs, unless otherwise specified, are created and owned by me.
(c) Victor Wiebe