Changing the rotation angle in this model is through the use of two gears that is inside the Pin Connector Toggle Join.
This has been well illustrated and described in book "The Unofficial LEGO Technic Builder's Guide" on page 96 and 142.
The stabilisation of the system ensures correct mounting Perpendicular H-Shape Liftarm that is on both side of.
Free end of horizontal axle is for supply power from power engine. Bottom end of vertical axle can be free or can set in motion desired element.
It is not perfect but... do own job.
Distance between two square frames is 9 studs. Enough to put your EV3 Intelligent Brick into this cage... and make your creativity unlimited.