Programming Parallax Servo

bluejaybluejay Posts: 75
edited 2019-10-26 - 08:16:03 in Learn with BlocklyProp
When programming the servo in BS2 basic language, one example is " For counter = 1 to 220
Pulsout 12, 750
Pause 20
Next"

Can someone please tell me why program a loop, and what is the equivalent program above in BlocklyProp? Thanks

Comments

  • Title above should be "Programming Parallax Servo"
  • a standard servo expects a refresh every 50ms or so.

    the length of the pulse send in that period determines the position of the servo.

    no clue about blockly,

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • VonSzarvasVonSzarvas Posts: 1,672
    edited 2019-10-26 - 08:17:37
    bluejay wrote: »
    Title above should be "Programming Parallax Servo"

    If you click the gear icon, top right of your thread title, you can choose Edit to alter the title.

    Ps. done it for you this time :)
  • Thanks.
    I think that coding a servo with a loop is to hold the servo pointer at a certain position for a specific time. Can someone provide me with a blockly coding? Thanks
This discussion has been closed.