SHARE
TWEET

Untitled

a guest Feb 16th, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import math
  2. theta = int(input("give theta:"))
  3. fudge = 11/12#;
  4. theta = -theta#      
  5. maxz = 2350#;                         % Max pulse duration (us)
  6. minz = 850#;                          % Min pulse duration (us)
  7. pos = (theta%2*3.1415926)/(fudge*2*3.1415926)#; % Nomalized position (rad/2pi)
  8. pos = math.floor(pos*(maxz-minz)+minz)#;     % Scaled pulse duraction (us)
  9. print('M280 P4 S'+ str(pos) +' I1')#;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top