IoT - Kubus
/
Kubus
JNP3 16/17
Diff: frontend/kubus.js
- Revision:
- 21:959de2c64d28
- Parent:
- 20:bdb2bf657f29
- Child:
- 22:af4397ca4561
--- a/frontend/kubus.js Mon Jan 09 17:12:34 2017 +0100 +++ b/frontend/kubus.js Mon Jan 09 18:49:48 2017 +0100 @@ -147,7 +147,7 @@ const sensorCharts = new Charts("charts"); -setInterval(() => { +function update() { sensorCharts.addSensorData([ { name: "Distance at the entrance", @@ -162,4 +162,8 @@ value: Math.random() >= 0.5 } ]); -}, 5000); \ No newline at end of file + + setTimeout(update, 5000); +} + +update(); \ No newline at end of file