|
|
@ -1,17 +1,17 @@
|
|
|
|
var socket = io();
|
|
|
|
var socket = io();
|
|
|
|
|
|
|
|
|
|
|
|
socket.on('data', function(data){
|
|
|
|
socket.on('data', function(data){
|
|
|
|
console.log(data);
|
|
|
|
console.log(data);
|
|
|
|
document.getElementById('sample').style.opacity = data+"%";
|
|
|
|
document.getElementById('sample').style.opacity = data + "%";
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
socket.on('node5', function(sensor){
|
|
|
|
socket.on('node5', function(sensor){
|
|
|
|
console.log(sensor);
|
|
|
|
console.log(sensor);
|
|
|
|
document.getElementById("file").value = sensor;
|
|
|
|
document.getElementById("file").value = sensor;
|
|
|
|
if(distance5>0.02 && sensor==50){
|
|
|
|
if(distance5 > 0.02 && sensor == 50){
|
|
|
|
alert('u won.');
|
|
|
|
alert('u won.');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var form = document.getElementById('form');
|
|
|
|
var form = document.getElementById('form');
|
|
|
|
var input = document.getElementById('input');
|
|
|
|
var input = document.getElementById('input');
|
|
|
|