python to c


#1

hi all
can any one help me with this code need to converted to c
but i have a problems
#=======================================================================
stepPerS = 5 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#=======================================================================
steps = range(int(stepPerS))
for i,t in enumerate(steps):
hipAngle = (hipMaxDiff/len(steps))(i+1)
try:
anglNorm=hipAngle
(180/(hipMaxDiff))
except:
anglNorm=hipAngle*(180/(1))
hipAngle = currentHipAngle+hipAngle
self.con.servos[self.hipServoNum].setPos(deg=hipAngle)
#========================================================================

i know that
steps = range(int(stepPerS)) ======> steps=[0,1,2,3,4]
for i,t in enumerate(steps): ======> (0,0);(1,1);(2,2);(3,3);(4,4)

the problem is how to converted to c
there is no connection betwen “i” and “t”

try:
anglNorm=hipAngle*(180/(hipMaxDiff))
except:
anglNorm=hipAngle*(180/(1))

thank you in advance


#2

the same problem i have… does not work for me…


#3

I would like to know answer for that. Can anybody help?