• It also seems like up until the this crash happens, the network responses take longer and longer until the crash. I'm keeping a running average, f.e.

        let ws = new WebSocket("ws://192.168.43.247/my_websoc­ket", "protocolOne");
        let lastTime = performance.now()
        let timesCount = 0
        let totalTime = 0
        let averageTime = 0
        ws.addEventListener('message', ({data}) => {
            timesCount++
    
            const thisTime = performance.now()
            const elapsed = thisTime - lastTime
    
            totalTime += elapsed
            averageTime = totalTime / timesCount
    
            lastTime = thisTime
    
            mpuData = parseEspruinoJson(data)
        });
        ws.addEventListener('open', () => {
            ws.send("Hello to Espruino!");
        })
    
        setInterval(() => console.log('avg time:', averageTime), 2000)
    

    and at first the average is about 38 ms for the time between responses, and by the time it crashes the running average is around 50 ms. It increases steadily the whole time.

About

Avatar for trusktr @trusktr started