Required Materials


What is a “simple spirometer” ?

Principle of a simple spirometer

Level | Parameters :-: | :-: 1|30db 2|50db 3|70db 4|90db 5|110db

Practical Operation

Set and stick components as below:

Hardware Connect

Connect the analog noise sensor to the P1 port of the expansion board. Connect the OLED screen the the IIC port of the expansion board.




Step 1

Note:If there is a hint says some codebase will be deleted because of incompatibility. Don’t worry. You could go ahead as the hint or build a new item in the item menu bar.

Step 2

Snap the on start from the Basic, snap the initialize OLED with block from the OLED and initialize the OLED screen. Then set a smile icon on the micro:bit for micro:bit’ boot animation. Show the welcome to the game string on the OLED screen which means the test starts.

Step 3

Snap an if statement under the forever loop. Read the value of the P1 port and judge what the level it is. The micro:bit’s LED will show different height histogram for different levels. The icon will in full screen at the highest level. The OLED scren will show different numbers for different levels. It will show number 5 at the highest level. Duplicate above codings and judge 5 levels.


Program link:https://makecode.microbit.org/_7C3P4R3kXDC5

You also could directly download program by visiting website as below:




More Information