Monday, 20 July 2026

Revisiting the Micro:bit Express

 Revisiting the Micro:bit Express V1

There have been many iterations of the Micro:bit Express over the years. In all honesty, it had been sitting in a box at school since it was last used in an enrichment club a couple of years ago.

Recently, I brought home what can only be described as "the box of doom" and decided it was finally time to see if any of it still worked.

I'll spare you the full story...

The controller was broken, a few bits had disappeared over the years and, unsurprisingly, nothing worked anymore.

After spending a while trying to remember how I'd originally built it, I came to a simple conclusion.

Start again.

Rather than recreating the most advanced version straight away, I wanted to strip everything back and rebuild the project from first principles.

The original train eventually evolved into a wireless controller using two micro:bits—one controlling the train and the other acting as a remote control. It worked really well, but this version deliberately goes in the opposite direction.

It's about as simple as it gets.

Sometimes that's exactly what a project needs.

What you'll need

  • 1 LEGO train motor (with the original LEGO connector removed and two wires soldered on)
  • 1 classic LEGO train
  • 1 LEGO wagon to carry the electronics
  • 1 BBC micro:bit
  • 1 Drive:bit Lite motor driver (can buy in the uk @ least from here )
  • 1 AA battery box with 4 AA batteries

Software

I used the following site: Microsoft MakeCode for micro:bit

The project uses Microsoft MakeCode for micro:bit.

Before writing any code, you'll need to add the Drive:bit extension from the Extensions menu.


The Code

One thing I really like about this version is how little code it actually needs.

Press A to increase the speed.

Press B to stop the train.

That's it.

Eight years ago I probably would have wanted to add more features.

Today, I think there's something quite satisfying about keeping it this simple.

Why simplify it?

The previous version was technically much more capable.

It used two micro:bits, allowing one to act as a wireless remote control while the other drove the train around the track.

This version is, on paper, a regression.

Less hardware.

Less code.

Fewer features.

But revisiting the project has made me realise something.

Sometimes the simplest version is actually the most approachable.

There's something wonderfully satisfying about taking an ordinary LEGO train, adding a tiny computer and writing just enough code to bring it to life.

A child doesn't need to understand wireless communication or complex programming to experience that moment of excitement when something they've coded starts moving.

That feeling hasn't changed since I first built this project.

Video

Chris Penn on X: "@microbit_edu Express https://t.co/oJM8zsV4A6" / X


What's next?

I'm sure this won't be the final version.

Maybe the wireless controller will return, here is whay I used previously link

Maybe I'll add sensors.

Maybe I'll find another excuse to take it along to a computing club.

For now though, I'm enjoying its simplicity.

Sometimes it's enough just to remember why you built something in the first place.

When I first built this train, I wanted to show that a LEGO model could be controlled with code. Looking at it now, I think the more important lesson is something much simpler.

There's a real sense of magic in taking an ordinary toy, adding a tiny computer and writing just enough code to bring it to life. That feeling is just as exciting today as it was the first time I watched it move around the track.

My hope is that someone reading this looks at an old project sitting in their own "box of doom", dusts it off, and rediscovers the simple joy of making something move with code.

After all, that's how the next idea usually begins.

Twenty-one years of teaching. A lifetime of tinkering.

See you in the next project.


If you like this blog check out all the others here


Sunday, 12 November 2023

How to get coding with Minecraft Pi on a Pi 5.

 


Here are the steps needed to get Minecraft Pi working a Pi:

1.When you chose which image you are going to install make sure its the 32 bit 64 bi doesn't work with Minecraft Pi.

2. Using terminal install PiApps by running the following command:

wget -qO- https://raw.githubusercontent.com/Botspot/pi-apps/master/install | bash


3.Once installed open PyApps > games > Minecraft Pi (modded) and install

4. Head to terminal again and paste the following command:

cd ~ cd Desktop git clone https://github.com/AdventuresInMinecraft/AdventuresInMinecraft-Pi

5. This should put a folder on your folder desktop called: AdventuresInMinecraft-Pi

6. Next go the following directory: AdventuresInMinecraft-Pi/MyAdventures/mcpi

7. Open the util.py file in Idle or equivalent IDE.

8. Locate the following line of code: collections.iterable and replace it with collections.abc.iterable

9. You should now be able to create, save and run MCPI code from the following folder:

/AdventuresInMinecraft-Pi/MyAdventures



If you like this blog check out all the others here

Saturday, 28 October 2023

Raspberry Pi 5

 




usecases 1 week in:

  • Marking work on Class notebook on office 365
  • whilst listening to you tube 
  • editing a blog 
  • organizing a raspberry jam 
  • responding to school email through office 365.


In summary 1 week in multi tasking on basic school and teacher based tasks are now completed on my pi 5 rather than my school laptop. There is inevitably things I have to do on m school laptop like accessing SIM's and other things but this Pi 5 is very much going to reduce my dependence and need to bring my Laptop  home. In summary so far Pi 5 and not even over clocked is a game changer....



Over!


If you like this blog check out all the others here

Monday, 16 May 2022

Craig and Dave videos student recall questions....

Hi all, 

I'm attempting to train my year 12 GCE CS students into watching the Craig and Dave videos before they attend lessons to free up more time for coding and so they have some concept before attending the lesson. Craig and Dave promote this flipped learning approach and Alan O D has been talking about it for many years. As part of this process I have been trawling through videos of recent topics and posting questions based the videos as evidence that they have actually done this and to serve as useful notes these are the few that I have done so far are green........

Link to github for files 

1.4.2 Data Structures YT playlist

(a) Arrays (of up to 3 dimensions), records, lists, tuples. 

(b) The following structures to store data: linked-list, graph (directed and undirected), stack, queue, tree, binary search tree, hash table. 

(c) How to create, traverse, add data to and remove data from the data structures mentioned above. (NB this can be either using arrays and procedural programming or an object-oriented approach).

Files are are to download from here:


2.2.2 Computational methods YT playlist

(a) Features that make a problem solvable by computational methods.

 (b) Problem recognition.

 (c) Problem decomposition. 

(d) Use of divide and conquer.

 (e) Use of abstraction. 

(f) Learners should apply their knowledge of:

 • backtracking 

• data mining 

• heuristics 

• performance modelling

 • pipelining 

• visualisation to solve problems


2.3.1 Algorithms (Youtube playlist)


(c) Measures and methods to determine the efficiency of different algorithms, Big O notation (constant, linear, polynomial, exponential and logarithmic complexity). 

(d) Comparison of the complexity of algorithms.

Wednesday, 7 April 2021

Whack a block Pixel Art

 

#colours

# Orange

# Pink / Skin

# Green

# White

# Red

# Sky blue / cyan

# Brown

# DARK GREEN

# Black


#faces


#@kari lawlor

Creeper = [

[DG, DG, DG, DG, DG, DG, DG, DG],

[DG, BL, BL, DG, DG, BL, BL, DG],

[DG, BL, BL, DG, DG, BL, BL, DG],

[DG, DG, DG, BL, BL, DG, DG, DG],

[DG, DG, BL, BL, BL, BL, DG, DG],

[DG, DG, BL, BL, BL, BL, DG, DG],

[DG, DG, BL, DG, DG, BL, DG, DG],

[DG, DG, DG, DG, DG, DG, DG, DG],

]


#Pig 


#Alex



#print pixel art

#By @KariLawler (Twitter)

def print_PixelArt(List):

    block = 35 # wool

    x, y, z = mc.player.getPos()

    pixel_y = y + len(List) - 1

    pixel_z = z - 6

    for row in List:

        pixel_x = x

        for pixel in row:

            if pixel > -1:

                mc.setBlock(pixel_x, pixel_y, pixel_z, block, pixel)

            pixel_x += 1

        pixel_y -= 1


mc.postToChat("Please hit the TNT block")


while True:


    evs = mc.events.pollBlockHits()

    for e in evs:

        pos = e.pos


        block = mc.getBlock(pos.x, pos.y, pos.z)


        if block == 46:#TNT

            mc.postToChat("Creeper")

            print_PixelArt(Creeper)

        elif block == 20:#glasselse:

            mc.postToChat("Other block")


        

If you like this blog check out all the others here

Tuesday, 29 December 2020

Rainbow Road

   



Rainbow Road

In order to get the below code you will need to follow these blogs in order to get started:

Setting up the server link

My first code link

In this code you will use the following skills:

+Import code from libraries

+Create a connection to the Minecraft server(local on this pc only)

+Create a procedure to draw/drop a rainbow road beneath your feet every time that you move

Coding key skills

Selection

Iteration

Sequence

Data Structures(Lists)

Variables

Data Structures(2D arrays)

Input

Output

Logical Operators

Mathematical operators

String manipulation

Functions

Procedures

File handling

 

 

Instructions:

 Follow the steps below and you will get there pretty quickly:

1.Open Idle

2.Click on “File” > “New File”

3.Type out the following code

In the Adventures with Minecraft folder click on “Start Server”



5.At this point press enter and the following should happen….






7. Next press enter...then this should happen.....









 9. Next on Minecraft select “Multiplayer”.









9.Then type in "local host"









10.Type in local host and hit the “join server” button.


11. Press “Esc” on the keyboard to allow yourself to quickly pop back to IDLE so you can save and run your code.

12. In IDLE “File” >> “Save As” >> Call it “Rainbow road.py”

13. For it to work you will need to save it in a specific folder which is:

“AIMStarterKitPC\AdventuresInMinecraft-PC\MyAdventures”

Like I have here:














14. Still in IDLE select “Run” >> “Run Module”

15. Head back to Minecraft and you should see your code in action:

16. To kill the code / stop I from working you will need to press “Esc” >>> find this window in IDLE then close it down. See below:



 




If you like this blog check out all the others here

Sunday, 20 December 2020

Forcefield

  



Forcefield

Before we go any further this code was originally created by Elton Lane(@piinthesky2015) a few years back as part of a Minecraft coding resource pack that I curated called the "hackpack" see link. He has kindly said that he doesn't mind me reusing this code for this Java coding retake on Minecraft Python coding. This code will allow you to bore big chunks out of the landscape. See the demo video at the bottom for a demo of it in use.   

In order to get the below code to work you will need to follow these blogs in order to get started:

Setting up the server link

My first code link

In this code you will use the following skills:

+Import code from libraries

+Create a connection to the Minecraft server(local on this pc only)

+Create a procedure to draw a air "forcefield"

+ Using parameters 

+Conditional statements 


Coding key

Selection

Iteration

Sequence

Data Structures(Lists)

Variables

Data Structures(2D arrays)

Input

Output

Logical Operators

Mathematical operators

String manipulation

Functions

Procedures

File handling

 

 

Instructions:

 Follow the steps below and you will get there pretty quickly:

 

1.Open Idle

2.Click on “File” > “New File”

3.Type out the following code


4.In the Adventures with Minecraft folder click on “Start Server”




5.At this point press enter and the following should happen….






7. Next press enter...then this should happen.....









 9. Next on Minecraft select “Multiplayer”.









9.Then type in "local host"









10.Type in local host and hit the “join server” button.


11. Press “Esc” on the keyboard to allow yourself to quickly pop back to IDLE so you can save and run your code.

12. In IDLE “File” >> “Save As” >> Call it “Forcefield.py”

 

13. For it to work you will need to save it in a specific folder which is:

“AIMStarterKitPC\AdventuresInMinecraft-PC\MyAdventures”

Like I have here you can see three example programs:














14. Still in IDLE select “Run” >> “Run Module”

15. Head back to Minecraft and you should see your code in action:

 


16. To kill the code / stop I from working you will need to press “Esc” >>> find this window in IDLE then close it down. See below:



 


If you like this blog check out all the others here