please wait for approval after interval
This commit is contained in:
Родитель
d915b66d67
Коммит
6d6931024e
|
@ -39,15 +39,16 @@ function setDirection(pin){
|
|||
readProximityState(pin);
|
||||
count++;
|
||||
if (count > 3){
|
||||
console.log("-----count is more than 3-----");
|
||||
count = 0;
|
||||
request
|
||||
.post('localhost:8888')
|
||||
.send("pleeeeease wait for approval")
|
||||
.send('{"name":"tj","pet":"tobi"}')
|
||||
.end(function(res){
|
||||
if (res.ok) {
|
||||
console.log('proximity sensor----yay got ' + res.body);
|
||||
console.log('------proximity sensor----yay got ' + res.body);
|
||||
} else {
|
||||
console.log('proximity sensor----Oh no! error ' + res.text);
|
||||
console.log('------proximity sensor----Oh no! error ' + res.text);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче