Well, I don't know about for the second question, but this formula should work for your lever:
(GyroIn + 90) / 180 * 40 + 10 = Output
I have a couple math questions for you wizards o' calculus (and maybe we can use the thread for other people who need help!) --
1) I'm creating a lever as an input using a plate on the ground. A gyro gives me -90 to 90 from one side to the other. I want a range of 10-50 as the output. What would the formula look like?
2) I have a wallbot. It creeps around a wall with its left edge "sticking" to a wall. I'd like for the right or left thruster to fire harder when its farther off course. If the distance to the wall is >50 units, right thruster fires 1x. But if it gets to >100 units, it should be firing 10x. (Doesn't need to be specific, just a factor of "how hard it pushes back".) If there is an actual word or theory for this let me know, so I can read up.
Well, I don't know about for the second question, but this formula should work for your lever:
(GyroIn + 90) / 180 * 40 + 10 = Output
Lick the capacitor, lose your tongue, visual cortex and heart function.
-SkilletAudio
Bookmarks