go away spammer

Author Topic: Axon - I need an Example Source Code of PWM !  (Read 3087 times)

0 Members and 1 Guest are viewing this topic.

Offline Hasan999Topic starter

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 1
Axon - I need an Example Source Code of PWM !
« on: December 24, 2009, 04:33:41 PM »
After 6 hours of messing around with PWM... I still can't figure out how to control different Servo's simultaneously.

I can rotate the servo using:

PWM_timer3_Set_E4(1500);
delay_ms(1000);

BUT that 1500 is not 1.5ms center... its all messed up, I was just different values there to get some logic out of it.. but !!!!!!! nevermind...

I really need to see some sample Code for example a Biped? or Robotic Arm? using PWM etc to control the Servos.

Sheesh, why is it so complicated ???...why not "THIS CODE" for this "microcontroller and servo"  ???

(im using Axon Microcontroller (16MHz) and using HS-422 Servo)

Thanks a lot in advance  :(

EDIT: Also, pls let me know, when to use delay_cycles(); and delay_ms(); ?...what exactly is delay_cycles?
Thanks !
« Last Edit: December 24, 2009, 04:37:48 PM by Hasan999 »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Axon - I need an Example Source Code of PWM !
« Reply #1 on: December 26, 2009, 12:30:03 AM »
If you search the forum, and even look at the Axon examples page, you'll find a lot of PWM code examples.

That being said, have you looked into WebbotLib? It'll make life easier for you I think.

 


Get Your Ad Here