Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Myo.on('fist', function(){
- console.log('object gripped');
- var date = new Date();
- var hours = date.getHours();
- var minutes = date.getMinutes();
- var seconds = date.getSeconds();
- var currentTime = ("" + hours + ":" + minutes + ":" + seconds)
- $.ajax({
- data: json.stringify({
- "gestureType": "pickup",
- "timestamp": currentTime
- }),
- type: 'POST',
- success: function(response){
- console.log(response);
- },
- error: function(error){
- console.log(error);
- }
- });
- this.vibrate();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement