Purpose
This project is to build a windscreen wiper, it came to me by accident when I was browsing and I thought it would be a good idea to accomplish it through blocks.
Background
When the four rods of the parallelogram mechanism are in a straight-line position, the movement of the follower is uncertain. In order to avoid this phenomenon, a parallel rod is often added to the parallelogram mechanism (a parallelogram mechanism in the overview figure above). One of the characteristics of this mechanism is that the relative rods are always parallel, and the angular displacement, angular velocity and angular acceleration of the two connecting rods are always equal.
Reciprocating motion: To and fro motion on both sides near a certain position is reciprocating motion.
Assenbly
Parts list
Steps:
Please download the io. file if you have Lego studio: The-Windscreen-Wiper.io
After assembly, connect with Nezha breakout board and the motors.
Hardware connections
Software Programm
Click “Advanced” in the MakeCode to see more choices.
For programming, we need to add a package: click “Extensions” at the bottom of the MakeCode drawer and search with “nezha” in the dialogue box 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.
Code:
Link: https://makecode.microbit.org/_av1Mdb3i5Ybd
Result
Press button A to start the wiper and button B to stop.