Shop OBEX P1 Docs P2 Docs Learn Events
servo.c — Parallax Forums

servo.c

surixurientsurixurient Posts: 4
edited 2014-05-25 08:30 in Propeller 1
Hi, I am trying to fully understand the servo code and this part of pulse_outCtr I do not understand.
int state = get_output(pin);  
if(state == 1)
  {
    phsVal = -phsVal;
    phs = -1;
    frq = -1;
  }

when would the pin's output be on at the beginning of a new pulse and what would these new values mean for the pulse?

Thanks.

Comments

  • surixurientsurixurient Posts: 4
    edited 2014-05-24 15:39
    would it make it pulse low instead of pulsing high?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-25 08:30
    Sorry, I haven't used C on the Propeller much.

    I thought I'd give this a bump to see if anyone else can help.

    If it's alright with surixurient, a moderator might want to move this to the Propeller C forum.
Sign In or Register to comment.