# Case 67: The Blocks Emitter ## Introduction Use **[Nezha 48 IN 1 Inventor's Kit](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-nezha-48-in-1-inventors-kit-without-micro-bit-board?_pos=2&_sid=ed1b6fbd2&_ss=r)** and [Potentiometer ](https://shop.elecfreaks.com/products/elecfreaks-planetx-trimpot-sensor?_pos=1&_sid=5a8a7f5cf&_ss=r)to make a blocks emitter that can control the firing frequency with a knob and can be loaded automatically. ![](./images/neza-inventor-s-kit-case-67-01.png) ## Case Building ### Materials Required **[Nezha 48 IN 1 Inventor's Kit](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-nezha-48-in-1-inventors-kit-without-micro-bit-board?_pos=2&_sid=ed1b6fbd2&_ss=r)** [Potentiometer](https://shop.elecfreaks.com/products/elecfreaks-planetx-trimpot-sensor?_pos=1&_sid=5a8a7f5cf&_ss=r) Rubber bands ### Assembly Parts list ![](./images/neza-inventor-s-kit-case-67-02.png) The structure is built as shown in the figure: ![](./images/neza-inventor-s-kit-step-67-01.png) ![](./images/neza-inventor-s-kit-step-67-02.png) ![](./images/neza-inventor-s-kit-step-67-03.png) ![](./images/neza-inventor-s-kit-step-67-04.png) ![](./images/neza-inventor-s-kit-step-67-05.png) ![](./images/neza-inventor-s-kit-step-67-06.png) ![](./images/neza-inventor-s-kit-step-67-07.png) ![](./images/neza-inventor-s-kit-step-67-08.png) ![](./images/neza-inventor-s-kit-step-67-09.png) ![](./images/neza-inventor-s-kit-step-67-10.png) ![](./images/neza-inventor-s-kit-step-67-11.png) ![](./images/neza-inventor-s-kit-step-67-12.png) ![](./images/neza-inventor-s-kit-step-67-13.png) ![](./images/neza-inventor-s-kit-step-67-14.png) ![](./images/neza-inventor-s-kit-step-67-15.png) ![](./images/neza-inventor-s-kit-step-67-16.png) ![](./images/neza-inventor-s-kit-step-67-17.png) ![](./images/neza-inventor-s-kit-step-67-18.png) ![](./images/neza-inventor-s-kit-step-67-19.png) ![](./images/neza-inventor-s-kit-step-67-20.png) ![](./images/neza-inventor-s-kit-step-67-21.png) ![](./images/neza-inventor-s-kit-step-67-22.png) ![](./images/neza-inventor-s-kit-step-67-23.png) ![](./images/neza-inventor-s-kit-step-67-24.png) ![](./images/neza-inventor-s-kit-step-67-25.png) ![](./images/neza-inventor-s-kit-step-67-26.png) ![](./images/neza-inventor-s-kit-step-67-27.png) ![](./images/neza-inventor-s-kit-step-67-28.png) ![](./images/neza-inventor-s-kit-step-67-29.png) ![](./images/neza-inventor-s-kit-step-67-30.png) ![](./images/neza-inventor-s-kit-step-67-31.png) ![](./images/neza-inventor-s-kit-step-67-32.png) ![](./images/neza-inventor-s-kit-step-67-33.png) ![](./images/neza-inventor-s-kit-step-67-34.png) ![](./images/neza-inventor-s-kit-step-67-35.png) ![](./images/neza-inventor-s-kit-step-67-36.png) ![](./images/neza-inventor-s-kit-step-67-37.png) After the construction is completed, as shown in the following figure: ![](./images/neza-inventor-s-kit-step-67-38.png) ### Connection Diagram Connect the [Potentiometer ](https://shop.elecfreaks.com/products/elecfreaks-planetx-trimpot-sensor?_pos=1&_sid=5a8a7f5cf&_ss=r)to J1 port, and the [Motor](https://shop.elecfreaks.com/products/elecfreaks-high-speed-building-blocks-motor?_pos=4&_sid=a2da3fff8&_ss=r) to M1 port on [Nezha Breakout Board](https://shop.elecfreaks.com/products/elecfreaks-nezha-breakout-board?_pos=1&_sid=00432325a&_ss=r) . ![](./images/neza-inventor-s-kit-case-65-03.png) ## MakeCode Programming ### Step1 Click “Advanced” in the MakeCode drawer to see more choices. ![](./images/neza-inventor-s-kit-case-37-04.png) For programming the potentiometer, we need to add an extension library. Search with "PlanetX" in the dialog box to download this library. ![](./images/neza-inventor-s-kit-case-37-05.png) For programming the Nezha expansion board, we need to add an expansion library. Search with "Nezha" in the dialog box to download it. ![](./images/neza-inventor-s-kit-case-37-06.png) *Notice*: If you met a tip indicating that some codebases would be deleted due to incompatibility, you may continue as the tips say or create a new project in the menu. ### Step 2 ### Write the program as the picture suggests ![](./images/neza-inventor-s-kit-case-65-07.png) ### Reference Link: [https://makecode.microbit.org/_L7shxbLtVJYY](https://makecode.microbit.org/_L7shxbLtVJYY) You may also download it directly:
### Result The potentiometer allows you to control the firing frequency of the blocks emitter. ![](./images/neza-inventor-s-kit-case-67.gif)