Reader small image

You're reading from  Full Stack Web Development with Raspberry Pi 3

Product typeBook
Published inAug 2017
Reading LevelExpert
PublisherPackt
ISBN-139781788295895
Edition1st Edition
Languages
Right arrow
Author (1)
Soham Kamani
Soham Kamani
author image
Soham Kamani

Soham Kamani is a full-stack developer who has extensive experience in the JavaScript ecosystem. He works as a consultant, developing end-to-end web-based solutions for clients around the world. He is an open source enthusiast and an avid blogger. He has worked on many frameworks and technologies such as React, Angular, Node, Express, Sails, SQLite, Postgres, and MySQL, and he has worked on many projects in the IoT space using Arduino and Raspberry Pi systems.
Read more about Soham Kamani

Right arrow

Integrating sensor data into our charts

The goal of this section is to have our sensor data reflect in our charts. We know that readings are measured every two seconds. This means that we will also have to update our charts every two seconds. This is a slightly different situation when compared to the sample chart we created earlier because there are some assumptions that we didn't consider:

  • The constant readings from the sensor require that our chart be dynamic. The values plotted have to change every time a new reading comes.
  • We must choose a sensible scale. Our sample chart had values from 12 to 23. In the real world, temperature and humidity readings rarely change that often or that drastically, especially when we are measuring on a per-second timescale.

Fortunately, the Chart.js library has features to take care of both of these new findings. Let's modify our...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Full Stack Web Development with Raspberry Pi 3
Published in: Aug 2017Publisher: PacktISBN-13: 9781788295895

Author (1)

author image
Soham Kamani

Soham Kamani is a full-stack developer who has extensive experience in the JavaScript ecosystem. He works as a consultant, developing end-to-end web-based solutions for clients around the world. He is an open source enthusiast and an avid blogger. He has worked on many frameworks and technologies such as React, Angular, Node, Express, Sails, SQLite, Postgres, and MySQL, and he has worked on many projects in the IoT space using Arduino and Raspberry Pi systems.
Read more about Soham Kamani