You are reading a single comment by @rsm and its replies. Click here to read the full conversation.
  • Thanks Gordon, that worked :)

    I have two more questions though:

    1. How do I see the JavaScript that the Blockly Code produces? I thought that toggling to the JavaScript view would update the code, but it does not.

    2. Is there a delay() or sleep() function? I just want to move a servo, wait a second (for it to move), then move it again. I thought setTimeout() would work, but it does not. This line of code works:
      setTimeout("analogWrite(C6, 2.0 / 50.0, {freq:20});",4000);
      But if I put this line after it, the code no longer works (properly):
      setTimeout("analogWrite(C6, 1.0 / 50.0, {freq:20});",4000);
      I tried playing with clearTimeout() to no avail.

    Thanks,
    Rehman

About

Avatar for rsm @rsm started