Inventors Kit Experiment 3 Further Help

Inventors Kit Experiment 3 Further Help. This resource has been produced to compliment the booklet provided with the Inventors Kit for the BBC micro:bit as a source of further information and hints and tips.

This further help resource contains download links for additional code examples and also a walk-through video that covers the experiment in full. The video also has hints and tips to help you complete the experiment.

Inventors Kit Experiment 3 - Dimming An LED Using A Potentiometer:

This experiment will use a 'variable' to track whether an LED should be turned on or off when a push switch is pressed. A potentiometer will be used to alter the brightness of an LED when it is on. This is achieved by two seperate loops of code that run at the same time. One remembers the state of the switch (on or off). The other outputs a signal to the LED based on the voltage it reads from the potentiometer. The higher the voltage from the potentiometer the brighter the LED shines. It does this using pulse width modulation (PWM) and the later experiments go into more detail about how these signals work.

Video Walk-Through With Hints & Tips:

Inventors Kit Experiment 3 Code Examples:

Although we advocate moving over to the Microsoft PXT Editor, we will continue to provide links to legacy code examples for as long as the links work or until the legacy editors are no longer available. Please select your desired option below and the options for your choice will open up.

PXT Editor & Python Editor Code:

The PXT option is a download, the file has been zipped and will need to be unzipped before transferring to a microbit. You can also drag and drop the unzipped file directly into the PXT editor for viewing or editing.

Booklet Errata:

The current version of the BBC micro:bit booklet is 1.3. If you have version 1.1 then please see below for corrections made to the current version.

On page 23 there is a box describing which blocks you need for this experiment.

We incorrectly listed an IF DO ELSE block. This should be an IF DO block.

You then need to click the cog icon to change the 'if do' block into an 'if do else' block by dragging the 'else' into the 'if' loop as shown below.

Booklet Errata 1.3 - 1.5:

The booklet has now been updated to Version 1.5 with all code examples being produced and shown in the Microsoft PXT editor. The image below shows the corect block to use when coding this experiment using the PXT Editor.