diff --git a/main.js b/main.js index 064735f..c6694d5 100644 --- a/main.js +++ b/main.js @@ -16,7 +16,7 @@ setInterval(function() { }, 500); function createTimeline() { - var chart = new SmoothieChart({grid:{fillStyle:'transparent'}}); + var chart = new SmoothieChart({grid:{fillStyle:'transparent'}, labels:{fillStyle:'#000000'}}); chart.addTimeSeries(random, { strokeStyle: 'rgba(0, 0, 0, 1)', fillStyle: 'rgba(0, 0, 0, 0.1)', lineWidth: 4 }); chart.streamTo(document.getElementById("chart"), 500); } diff --git a/main.py b/main.py index 543d2c9..8e8b83f 100644 --- a/main.py +++ b/main.py @@ -110,6 +110,8 @@ def stream(dev): with serial.Serial(dev, timeout=1) as s: while True: temperature = s.readline().decode().strip() + if not temperature: + continue print("temperature", temperature) temps.append(temperature)