58. Case 54: Happy Seesaw¶
58.1. Introduction¶
Make a seesaw with Nezha 48 IN 1 Inventor’s Kit.
58.3. Connection Diagram¶
As the picture suggests,connect the sonar:bit to J1,connect the Motors to the Nezha M1.
58.4. MakeCode Programming¶
Step 1¶
Click “Advanced” in the MakeCode drawer to see more choices.
For programming the servo, we need to add a package. Click “Extensions” at the bottom of the drawer and search with “nezha” to download it.
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 picture suggests¶
Result¶
When there is an obstruction in front of it. the objects will be pushed down automatically.