• missing packets? that's very strange and should not happen. However you mean that you would really not mind missing complete lines from the output if it was sent line by line?

    I don't know if there is something like Bluetooth.flush() or some character to write that would do it, maybe not. If not then splitting the loop so it goes to idle loop after each line could help. Like scheduling each write line via setTimeout

    can you try something like

    [1,2,3,4,5].forEach(d=>setTimeout(v=>pri­nt(v),0,d));
    
About

Avatar for fanoush @fanoush started