Skip to content

Commit

Permalink
brazo 3 angles
Browse files Browse the repository at this point in the history
  • Loading branch information
Julio César committed Apr 9, 2016
1 parent 8db74a0 commit 931b230
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,23 @@ board.on("ready", function() {
});

socket.on('pinzaA', function () {
servoPinza.to(200)
servoPinza.to(180)
});

socket.on('pinzaD', function () {
servoPinza.to(90)
});

socket.on('brazoW', function () {
servoBrazo.to(150)
servoBrazo.to(0)
});

socket.on('brazoS', function () {
servoBrazo.to(90)
});
socket.on('brazoX', function () {
servoBrazo.to(180)
});

socket.on('servoCam', function (gradosCam) {
servoCam.to(gradosCam)
Expand Down
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@
"on_keyup": function(e) {
console.log("--");
}
},{
"keys": "x",
"on_keydown": function() {
socket.emit('brazoX');
},
"on_keyup": function(e) {
console.log("--");
}
},{
"keys": "shift",
"on_keydown": function() {
Expand Down

0 comments on commit 931b230

Please sign in to comment.