@juliocesar_io
https://juliocesar.io
Javascript Robotics
Numeros, blah.
Historia, Chromium, Google, blah
var five = require('johnny-five');
var board = new five.Board();
board.on('ready', function () {
var led = new five.Led(13);
led.blink();
});
$ npm install johnny-five
led.js
$ [sudo] node led.js
Blink a Led
module.exports = {
Accelerometer: require("./accelerometer"),
Animation: require("./animation"),
Board: require("./board"),
Button: require("./button"),
Compass: require("./compass"),
Distance: require("./distance"),
ESC: require("./esc"),
Gripper: require("./gripper"),
Gyro: require("./gyro"),
IR: require("./ir"),
LCD: require("./lcd"),
Led: require("./led"),
LedControl: require("./ledcontrol"),
Joystick: require("./joystick"),
Motor: require("./motor"),
Nodebot: require("./nodebot"),
Piezo: require("./piezo"),
Ping: require("./ping"),
Pir: require("./pir"),
Relay: require("./relay"),
Sensor: require("./sensor"),
Servo: require("./servo"),
ShiftRegister: require("./shiftregister"),
Sonar: require("./sonar"),
Stepper: require("./stepper"),
Switch: require("./switch"),
Wii: require("./wii")
};
and more...
http://voyager.readthedocs.io
A bits en el hardware
"keys": "up",
"on_keydown": function() {
socket.emit('goForward');
Emite un socket
board = new five.Board();
board.on("ready", function() {
// Codigo cool
});
Abre el puerto serial
socket.on('goForward', function(){
// Turn on right motor
that.digitalWrite(rMotorN1, 1);
that.digitalWrite(rMotorN2, 0);
that.analogWrite(rMotorNA, speed);
// Turn on left motor
that.digitalWrite(lMotorN3, 0);
that.digitalWrite(lMotorN4, 1);
that.analogWrite(lMotorNB, speed);
});
Se ejecuta codigo en arduino
Se establece comunicacion con exito
July 27
EMPEZAMOS NODEBOTS EN MONTERIA !!!
@juliocesar_io
THX !!!