16. Case 14: The Reading Range Guitar¶
16.8. Coding¶
Add extensions¶
Click “Advanced” in the MakeCode to see more choices.

Search with Wukong in the dialogue box to download it.

Search with https://github.com/elecfreaks/pxt-sonarbit in the dialogue box to add the sonar:bit extension.

Result¶
By detecting the value of the distance between the ultrasonic sensor and the baffle only, the buzzer is controlled to emit different tones.
































