Calculating distance moved from X & Y value inputs from sensors

4 years 8 months ago #29531546 by SouthernAtHeart
Two sensors input X & Y values from a 2-axis table. I need to calculate the distance traveled, to use as a motor input command. The Hypotenuse is what I'm needing: sqrt( sq(X) + sq(Y)).
But there's no provision for getting the square root. Is there some other 'long hand' math that I can do this with? Am I correct that the microscript only supports abs, mod, and + - * /
There's got to be a way to come up with travel distance from the X val and Y val.1

Please Log in or Create an account to join the conversation.

4 years 8 months ago #29531553 by niko
Hello,

we have a beta version, where sin, cos, atan and sqrt are also implemented.

Please refer to This email address is being protected from spambots. You need JavaScript enabled to view it. in order to provide you the firmware.

Please Log in or Create an account to join the conversation.

Time to create page: 0.115 seconds