• Regarding a pause. I am really missing it.

    there are promises, setTimeout (just google 'javascript sleep') or in this case you can send next message in ack/nack handler of previous message?

    Tried to implement sleep() in C

    To make fastest sleep ever? You can shoot yourself in the foot much easier in javascript via for or while loop, or even digitalPulse, no need for inline C to block everything.

    Uncaught Error: 'E.InlineC' calls should have been replaced

    this needs to run gcc behind scenes, you are probably copy pasting directly to console or directly upload file or compiler in WebIDE does not work for some reason.

  • there are promises, setTimeout (just google 'javascript sleep')

    promises are too cumbersome (for me :)). setTimeout is not blocking current "thread". Though it is possible to issue multiple growing timeouts for each message.

    or in this case you can send next message in ack/nack handler of previous message?

    That is exactly what I've done. And this is the best way. Better than a "pause".

    To make fastest sleep ever? You can shoot yourself in the foot much easier in javascript via for or while loop, or even digitalPulse, no need for inline C to block everything.

    while loop will eat energy. Sleep supposed to halt CPU. Yes in case of single threaded it will stop everything. Question - will it stop UARTs?

    this needs to run gcc behind scenes, you are probably copy pasting directly to console

    yes :(. Understood.

About

Avatar for Mark_M @Mark_M started