Lighthouse coding

A lighthouse lit up at night time on an isolated rock in a rough sea.
Blackrock Island photo by Helen Geraghty Munnelly

This November, I have had the pleasure of working with colleagues Dermot Walsh, Farnan Harte, Kevin Munelly and Adrian Ormsby. They are the principals at Cornanool, Ardagh, Quay and Clogher primary schools respectively in Co. Mayo, Ireland. They formed a Digital Creative Cluster project to combine digital technology in an art work made collaboratively across the schools.

In truth the privilege was the chance to work with their energetic, imaginative and polite students.

Student at Ardagh school designing an art work of a light bulb incorporating an LED
Student at Ardagh school designing an art work of a light bulb incorporating an LED

My goal was to establish the competence to use Microbit and LED technology to include in a work of art to be developed.

Over two sessions, we:

Given a free rein, the art produced included many spaceships, cars, light bulbs and signet rings, as well as a couple of lighthouses.

Artwork of colourful lighthouse with LED from Ardagh School
Artwork of colourful lighthouse with LED from Ardagh School

This inspired discussion with the principals and raised the idea to focus on the flashing lighthouse, with its symbolism of identity and function of communication, as an exercise to make a dynamic Microbit project.

Could students code the Microbit to simulate a lighthouse?

We explored the LEDs on the Microbit and discussed the pause function in Makecode and decided we could, but after some introduction, it was left as an exercise for students to complete after I left.

So last night, I slept restlessly with troubling thoughts of unfinished business. I’ve learnt to get up and do something when this happens, rather than lose sleep in fitful discomfort!

So this is fruit of my feverish night mind – a simple Microbit program that I could have offered as a solution.

The challenge to you, is to run my program and study its output, before you inspect the code, while imagining you are:

  • Out to sea on a clear Christmas night off the western Irish Coast.
  • The battery is flat on the GPS.
  • All you can do is spot stars and lighthouses.
  • Where are you and which direction are you heading?
  • What has this to do with Christmas?

You can find out by downloading my program, unzip it and drag the hex file into a new project in Makecode, run it there with the emulator or download it to a Microbit and then imagine you are seeing the lights on the Microbit as objects in the landscape before you.

If you want, you can print my poster for this challenge on card, cut out the window to see the microbit display having fixed it to the back, and mount it on the wall in class for students to look at and attempt to work it out. Email me with their answer to the challenge and I’ll send the fully commented code.

Can you answer the questions, before you read the code?

Can you answer them after inspecting the code?

Merry Christmas to all the learners (including principals and me) in the four schools and all my colleagues, friends and family!

Hints to help:

UPDATE: Here is the fully commented code which explains everything I hope!

One Reply to “Lighthouse coding”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.