An application of the My Bike’s Got LED boards to use them in interactive light-up bollards for bike workshops.

The Lightbeam was developed as part of a workshop at Kingsley Road School to promote active travel. Alongside workshops to teach Micro:bit coding, pupils were able to take part in bike games using the tech. Last Mile Postage is a game were parcels need to be delivered to the correct bollards, the Lightbeams light up to indicate the state of the game. Red light, green light used a remote controller to change the colours displayed on the bollards. In both games the Lightbeams communicate to controller Micro:bits using Bluetooth LE.

The hardware

The boards have been designed with additional footprints for both the USB C and battery JST connectors so they can be populated in two orientations. The usual My Bike’s got LED configuration has the access from the long side of the board. To fit inside the bollards we have populated the alternative configuration with the USB connection from the top ofthe boards and the battery perpendicular to the board surface.

Inside the 50mm frosted polycarb tubing there are three strips of addressable leds held in place with 3d printed connectors

Parcels and controllers are based on the Micro:bit with Bike Head boards providing the power.

The software

Lightbeam

My Bike’s got LED has a ESP32 C3 mini and is coded using the ESP IDF framework. There are two tasks running, one to manage the display shown on the strips and the other to scan and advertise the game state over BLE.

In the Last Mile Parcel configuration the board uses the Received Signal Strength Indicator to determine the proximity of parcels. Each bollard maintains a list of parcels it has seen advertising in the last five seconds. When the controller sends a ‘check’ command a call is made to the display to show if the correct parcels are at each bollard. Red lights indicate the wrong parcels are present and a rainbow effect is shown if only correctly numbered parcels are within range. To extend the range available in the game, each bollard rebroadcasts set/check commands as it recieves them, using a hop counter.

The Red Light / Green Light configuration uses a similar approach, but instead of checking for parcels in range it simply calls the display task to set the light colour red/green based on the broadcast it recieves from the controller. Again rebroadcasting is used to extend the range that can be achieved.

Parcel

For the Last Mile postage game Micro:bits provide the Parcel hardware, broadcasting a bollard number over BLE (GAP), this is selected randomly when the device is powered on. The data is provided as a URI field. The code for these devices is written in Zephyr

Controller

Micro:bits also provide the hardware for the controller devices used to control the games. The game state ‘Set’ or ‘Check’ is advertised over BLE (GAP) for the Last Mile Postage game. For Red Light/Green Light either ‘Red’ or ‘Green’ is broadcast. In both cases the state is selected with the A and B buttons on the Micro:bit. These game states are recieved by the Lightbeam devices and used to change the lights accordingly. Again the appropriate Micro:bit code is written in Zephyr.