Connect sound sensor with OSOYOO expansion board for Micro:bit P0 with 3pin wire as below;
Connect LED module with OSOYOO expansion board for Micro:bit P1 with 3pin wire as below;
Step 1. In the Toolbox, click on the Basic category , click and drag the show number block over and place it inside the placeholder of the forever block.
Step 2. Click on the pins category. Then click and drag the analog read pin block over, and place it inside the placeholder of the show number block.
Step 3. In the Toolbox, click on the logic category . Now, click and drag the if ~then~else block over and and place it inside the forever block .
Step 4. Drag and drop a 0<0 block inside the if ~then~else block just below the show number block.
Step 5. In the Toolbox, click on the pins category and Click and drag the analog read pin block over and place it inside the 0<0 block. Then writed the 700 in it .
Step 6.Click on the pins category. Then click and drag the digital write pin block over, and place it inside the if ~then ~else block. Then choose P1 from the drop-down menu.
Step 7. Click duplicate from the digital write pin to block over . You will get a duplicated block ,and place them inside the else block .changed the 0 to 1 .
Step 8. Download this “.hex” file and send it to your MICROBIT disk.
Below is the full code we have done for you as reference:
.
DownLoad Url osoyoo.com