# Case 05: Wipers ## Purpose To build a wiper. ![](./images/Ringbit_Bricks_Pack_case_en_05_01.png) ## Products Link [ELECFREAKS micro:bit 6 IN 1 Ring:bit Kit](https://www.elecfreaks.com/ring-bit-bricks-pack.html) ## Materials ![](./images/Ringbit_Bricks_Pack_case_en_05_02.png) ## Background Knowledge ## Bricks build-up ![](./images/Ringbit_Bricks_Pack_step_05_01.png) ![](./images/Ringbit_Bricks_Pack_step_05_02.png) ![](./images/Ringbit_Bricks_Pack_step_05_03.png) ![](./images/Ringbit_Bricks_Pack_step_05_04.png) ![](./images/Ringbit_Bricks_Pack_step_05_05.png) ![](./images/Ringbit_Bricks_Pack_step_05_06.png) ![](./images/Ringbit_Bricks_Pack_step_05_07.png) ![](./images/Ringbit_Bricks_Pack_step_05_08.png) ![](./images/Ringbit_Bricks_Pack_step_05_09.png) ![](./images/Ringbit_Bricks_Pack_step_05_10.png) ![](./images/Ringbit_Bricks_Pack_step_05_11.png) ![](./images/Ringbit_Bricks_Pack_step_05_12.png) ![](./images/Ringbit_Bricks_Pack_step_05_13.png) ![](./images/Ringbit_Bricks_Pack_step_05_14.png) ![](./images/Ringbit_Bricks_Pack_step_05_15.png) ![](./images/Ringbit_Bricks_Pack_step_05_16.png) ![](./images/Ringbit_Bricks_Pack_step_05_17.png) ![](./images/Ringbit_Bricks_Pack_step_05_18.png) ![](./images/Ringbit_Bricks_Pack_step_05_19.png) ![](./images/Ringbit_Bricks_Pack_step_05_20.png) ![](./images/Ringbit_Bricks_Pack_step_05_21.png) ![](./images/Ringbit_Bricks_Pack_step_05_22.png) A detailed assembly instruction can be downloaded via the below links: [Githubdownload ](https://github.com/elecfreaks/learn-cn/raw/master/microbitKit/ring_bit_bricks_pack/files/Ringbit_Bricks_Pack_step_05_v1.1.pdf) ## Software [MicroSoftmakecode](https://makecode.microbit.org/#) ## Code ### Step 1 Click "Advanced" in the MakeCode drawer to see more choices. ![](./images/Ringbit_Bricks_Pack_case_en_05_03.png) In order to programme for the Ring:bit Bricks Pack, we need to add an extension. Click "Extensions" at the bottom of the drawer. Search "servo" in the dialogue box to download it. ![](./images/Ringbit_Bricks_Pack_case_en_05_04.png) ***Note:*** If you met a tip indicating codebase will be deleted due to incompatibility, you may continue as the tips tell or build a new project. ### Step 2 While button A being pressed, set the servo connected to P0 port turning 180 degrees; while buttom B being pressed, set the servo connected to P0 port turning 90 degrees. ![](./images/Ringbit_Bricks_Pack_case_en_05_05.png) ***Note:*** As the servo we used is in 360 degrees, the "servo" extension in MakeCode is suitable for servos in 180 degrees, therefore, setting the turning angle to 0 degree or 180 degrees will lead to the servo turning clockwisely or anti-clockwisely, and 90 degrees means to stop turning. ### Code Link: [https://makecode.microbit.org/_6Pvbj1fPt33f](https://makecode.microbit.org/_6Pvbj1fPt33f) You can also download it directly below:
### Result When button A being pressed, the wiper begins working; while buton B being pressed, the wiper stops working. ## Exploration ## FAQ ## Relevant File Parallelogram mechanism: the two cranks as well as the connecting rod and frame are equal in length, their rotation speed and direction are in consistent. Reciprocating motion: back and forth on both sides near a certain position. The displacement of the reciprocating motion is equal to 0 because it is a positive stroke and a negative stroke. Mostly used in mechanical movements, such as pendulum, piston movement, etc.