Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. jQuery(document).ready(function(){
  2.  
  3. var sensorURL = "http://127.0.0.1:1880/data"
  4.  
  5.  
  6. function checkData(){
  7. jQuery.getJSON(sensorURL, function(sensorData){
  8.  
  9. console.log(sensorData);
  10. console.log("Test works every 10 sec...");
  11.  
  12. // change the following line to show the current temperature or some other data point from the SensorTag
  13. jQuery("p.api").html("This paragraph is controlled by jQuery");
  14.  
  15. });
  16. }
  17.  
  18. setInterval(checkData, 10000);
  19.  
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement