I got a gig to teach coding and robotics over the summer. Coding and robotics based around LEGO mindstorms platform, running text based code; Python.
It was to be a baptism by fire, and an opportunity in which I found myself forced to flip the classroom. A popular idea that has come to fore in recent years. The only way to make it work in my case.
I say flip, I wasn’t quite there. I couldn’t give the students homework, only classwork. The snag, the age ranges. The youngest would be ten. The oldest sixteen.
I ended up writing two dozen tutorials for the students to complete. They needed to be simple. They needed to have some end goal. They needed to be self explanatory. They needed to be understandable by a ten year old, and challenging enough for a sixteen year old.
Beyond the tutorials I had set out challenges, problems the students would try and solve using their new coding knowledge.
Here is a list of links to the tutorials I ended up creating. I have I must confess rewritten some of them and I need to add a few more still.
Brick Buttons. The code you need to be able to “do things” when the press the buttons on the LEGO brick.
MicroPython Tutorial I
I got a gig to teach MicroPython in a summer camp over the summer and I documented the experience and decided to…
Brick Lights. The code you need to change the lights on the brick when you press those buttons.
Simple Simon I. Combining the code in brick buttons and brick lights to build a simple game.
MicroPython Tutorial III
Ok, lets try and build a simple game with the code we learnt over the last two lessons in the next two. Here is our…
Simple Simon II. Continuation of the code to build that game.
Brick Sound. Continuation simple Simon game, adding some sound to the mix.
MicroPython Tutorial V
Bon, you got a simple game going, but there is room for improvement. I don’t know about you, but it is a little too…
Brick Images. Continuation simple Simon game, adding some images to the mix.
MicroPython Tutorial VI
Right, I am still finding it rather difficult, even with sound. Lets add some images. Start by adding a couple more…
Brick Images & Sound Review. A step back to look at the options for sound and images.
MicroPython Tutorial VII
We have charged ahead in the last few tutorials and I thought this might be a good place to take stock. As I said in…
Brick Motors. Using the buttons to make your robot move.
MicroPython Tutorial VIII
Ok, lets go back to basics. Here is the code to do the basic buttons on the brick, with some additions to include the…
Brick Sensors, the gyro. A simple introduction to the gyro. A little more depth with the motors.
MicroPython Tutorial IX
Time to introduce some sensors into the mix. We want you to add a gyro sensor to the basic rover model, add it to the…
Brick Motors II. A more in depth look at the commands to get your robot to move.
MicroPython Tutorial X
There is a second very similar, but subtlety different command to turn the wheels using angles. Change the template we…
Brick Motors III. An introduction to the robotics science known as odometry and some built in commands to use it like DriveBase.
MicroPython Tutorial XI
Continuing our discussion from the previous tutorial things get a whole lot more interesting when you use odometry to…
PID Controller using the gyro. Making use of the lessons learnt in the previous tutorials with a goal in mind, correcting drift; driving in a straight line.
MicroPython Tutorial XII
In the last tutorial we covered two things, some odometry formulas and a new command DriveBase. In this one I hope to…
Programming the LEGO remote. An rest byte from PID Controller concept. Controlling your robot with the LEGO remote.
MicroPython Tutorial XIII
We did quite a few tutorials with the brick buttons and then switched to a more basic task, driving in a straight line…
More Sensors, the colour one. A first look at how to use the colour sensor.
MicroPython Tutorial XIV
Lets move forward to the most interesting of all the sensors you get with the LEGO MINDSTORMS sets, the colour sensor…
Edge Detection, using that colour sensor. A practical look at how you can actually use the colour sensor.
MicroPython Tutorial XV
One of classic tasks in the world of robotics is edge detection. Edge detection being the method you would use to…
A iOS remote. A diversion again, this one focusing on using you iPhone or iPad to control your robot using a script that works with this app.
MicroPython Tutorial XVI
Ok, lets do something different. Now LEGO has an iOS app that you can use as a remote. It is very good and lets you…
Line Squaring, using colour sensors. A tutorial that focuses on using the colour sensor to square your robot on a line. Different from all of the others to date, since it also talks about engineering choices.
MicroPython Tutorial XVII
Ok, lets back to edges. One of the tasks you’ll surely need your robot to do is square its self up along an edge. A…
Ultra Sonic vs Infra Red vs Motors. A tutorial that looks at using one or more of three methods to measure distances.
MicroPython Tutorial XVII
Sensors. Beyond the colour and gyro sensors you have more, two notable ones the ultrasonic and infrared. We used the…
Touch sensors and a timing. A short tutorial that covers touch sensors and the stopWatch class in MicroPython.
MicroPython Tutorial XVIII
Ok, lets do something else for a break and indeed touch on the last sensor we’re going cover, which is called…
And that is it for now. I will be doing some tutorials on other sensors like the infrared, ultrasonic and return to the gyro in come weeks.