Skip to content

Instantly share code, notes, and snippets.

@Avotrix
Created June 17, 2020 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Avotrix/a5c2bd0a12d8a7aa8596e6ef08039255 to your computer and use it in GitHub Desktop.
Save Avotrix/a5c2bd0a12d8a7aa8596e6ef08039255 to your computer and use it in GitHub Desktop.
airqualitycheck5
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var x = (new Date()).getTime(), //X axis for time representation
y = parseFloat(this.responseText); //Y axix for Analog Gas value Representation
document.getElementById("SensorValue").innerHTML = this.responseText;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment