Hmm, nested setTimeout() functions. That works too. But unfortunately it doesn't solve my problem :(
I'm actually trying to write easy Blockly Blocks to teach kids to program. So I want simple blocks like "Move Left", "Move Center", etc. I should be able to stack a bunch of these blocks in sequence, click run, and watch the servo go through the motions with a small delay between each.
I'm not sure how to write the blocks to achieve the nested functionality in your last post. But if nothing else, maybe I can write them such that the timeout value is larger for each block added. It's not a perfect solution because I think it will require an init() block at the top of each program.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hmm, nested setTimeout() functions. That works too. But unfortunately it doesn't solve my problem :(
I'm actually trying to write easy Blockly Blocks to teach kids to program. So I want simple blocks like "Move Left", "Move Center", etc. I should be able to stack a bunch of these blocks in sequence, click run, and watch the servo go through the motions with a small delay between each.
I'm not sure how to write the blocks to achieve the nested functionality in your last post. But if nothing else, maybe I can write them such that the timeout value is larger for each block added. It's not a perfect solution because I think it will require an init() block at the top of each program.
Thanks again,
Rehman