+ setInterval(rpiping,timeping);
+ function rpiping() {
+ let xhr = new XMLHttpRequest();
+ xhr.open('GET', '/rpiping', true);
+ xhr.onload = function() {
+ if (xhr.status == 200) { //can use this.status instead
+ //console.log(xhr.responseText);// para ver en la consola
+ raspberry.value=xhr.response;
+ console.log("getting controller data");
+ }
+ }
+ xhr.send();