Advertisement
Guest User

Untitled

a guest
May 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         Myo.on('fist', function(){
  2.             console.log('object gripped');
  3.             var date = new Date();
  4.             var hours = date.getHours();
  5.             var minutes = date.getMinutes();
  6.             var seconds = date.getSeconds();
  7.             var currentTime = ("" + hours + ":" + minutes + ":" + seconds)
  8.  
  9.             $.ajax({
  10.                 data: json.stringify({
  11.                     "gestureType": "pickup",
  12.                     "timestamp": currentTime
  13.                 }),
  14.                 type: 'POST',
  15.                 success: function(response){
  16.                     console.log(response);
  17.                 },
  18.                 error: function(error){
  19.                     console.log(error);
  20.                 }
  21.             });
  22.  
  23.             this.vibrate();
  24.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement