Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- theta = int(input("give theta:"))
- fudge = 11/12#;
- theta = -theta#
- maxz = 2350#; % Max pulse duration (us)
- minz = 850#; % Min pulse duration (us)
- pos = (theta%2*3.1415926)/(fudge*2*3.1415926)#; % Nomalized position (rad/2pi)
- pos = math.floor(pos*(maxz-minz)+minz)#; % Scaled pulse duraction (us)
- print('M280 P4 S'+ str(pos) +' I1')#;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement