Balancerator: inclination-to-servo scaling sketch
scaleMotors / convertDeg — ints eating decimals, static input, degree/radian mess
redo from the COM equation. test zero + both signs + acos limits BEFORE motor movement
reference functions: scaleMotors(float inclination) and convertDeg(float value) under “Servo-Scaling Function.” Inputs include natural-balance angle, waist height, body mass, shaft length and pendulum mass. The Day 21 log records an initial global/local-variable mismatch followed by an input/output test described as successful.

Arduino main-function flowchart, version 1.
code-review flags in the printed sketch: fractional values such as 43.3 and 2.6 are assigned to int; w is a static int initialized from the incoming inclination; trigonometric expressions mix degree-looking constants with cos/acos; and convertDeg multiplies by π/180 even where the expression is already an inverse-trig output. There are also incomplete syntax/API calls in the printed listing. Treat it as a historical sketch, not upload-ready firmware.
reference equation: start again from the center-of-mass balance with explicit units and angle convention, then test the function separately from motor movement. Review cases: zero inclination, positive/negative symmetry, input outside the intended range, and inverse-cosine domain boundaries. These checks are proposed here, not claimed historical results.
