%
;reads Jog Pot analog pin value end sets Ext1 output
;this g-code runs in endless loop 
;  M64 arguments:
;    M64 H<ssel> Q<value> [L<length>]

#<pin> = 0
#1 = 0
o10 while[#1 LT 100]
  #<pin> = FIX[#<_hw_jogpot> / 128]
  (print,Pot=#<_hw_jogpot,0>, Pin=#<pin,0>)
  M64 H1 Q[2 ** #<pin>] L10
  G09
o10 endwhile
%
