[HELP] Need example of GY-521 (MPU6050) to generate PWM for driving motor L/R

:blush: i'm super newbie at arduino but very determined to learn up.

i've been looking around for many segway related projects. all those i've found included a potentiometer at the bottom/top of the handle bar for steering towards left or right.

i'm planning to mount the MPU6050 at about knee level so that i get good enough x-axis reading to know if the angle is dropping towards left/right.

can some kind souls here offer opinion and also a link to how this could be done?

as a newbie here, sticks/suggestions are mostly welcomed. thanks! :grin: