My motors dont want to work using johnny-five and h-brigde

Hey guys, im tring to make 2 motors-dc to work using a h-brigde L293D a arduino uno and johnny-five library, when i run my code, its all fine but the motors doesnt run, plzzz help me the code of program is this

var five = require(“johnny-five”),
board = new five.Board();

board.on(“ready”, function() {
var motor;
/*
Motor A
pwm: 3
dir: 12
*/

motor = new five.Motor({
pins: {
pwm: 3,
dir: 12
},
invertPWM: true
});

board.repl.inject({
motor: motor
});

motor.on(“start”, function() {
console.log(“start”, Date.now());
});

motor.on(“stop”, function() {
console.log(“automated stop on timer”, Date.now());
});

motor.on(“forward”, function() {
console.log(“forward”, Date.now());

// demonstrate switching to reverse after 5 seconds
board.wait(5000, function() {
motor.reverse(255);
});
});

motor.on(“reverse”, function() {
console.log(“reverse”, Date.now());

// demonstrate stopping after 5 seconds
board.wait(5000, function() {
motor.stop();
});
});

// set the motor going forward full speed
motor.forward(255);
});

For informed help, please read and follow the directions in the "How to use this forum" post.

For motor problems, post links to the data sheets for the motors, motor drivers and power supply. Post a hand drawn (not Fritzing) wiring diagram.

/**

  • This example is intended for dual H-bridge (quad half H-bridge) motor
  • driver ICs, like the Texas Instruments SN754410. It isn't intended for
  • motor driver breakout boards or more sophisticated drivers, which handle
  • the PWM inversion for you.
    */

var five = require("johnny-five"),
board = new five.Board();

board.on("ready", function() {
/**

  • Motor A: PWM 11, dir 12
  • Motor B: PWM 5, dir 4
    */
    var motors = new five.Motors([
    { pins: { dir: 12, pwm: 11 }, invertPWM: true },
    { pins: { dir: 4, pwm: 5}, invertPWM: true }
    ]);

board.repl.inject({
motors: motors
});

// Go forward at full speed for 5 seconds
console.log("Full speed ahead!");
motors.forward(255);
board.wait(5000, function () {
motors.stop();
});

// Go backwards at full speed for 5 seconds
console.log("Now backwards!");
motors.reverse(255);
board.wait(5000, function () {
motors.stop();
});

// Go left...
console.log("To the left!");
motors[0].reverse(200);
motors[1].forward(200);
board.wait(5000, function () {
motors.stop();
});

// Go right...
console.log("To the right!");
motors[0].forward(200);
motors[1].reverse(200);
board.wait(5000, function () {
motors.stop();
});

// Use REPL if you want to go further
console.log("Done auto-driving! Use motors to control motors in REPL");

});

when i run the code happens this:

F:\biblioteca\Área de Trabalho\Node-Study\RoboNode>node RoboNode.js
1541129596406 Available COM4
1541129596422 Connected COM4
1541129598130 Repl Initialized

Vai para FRENTE! --------------- forward
Vai Para TRAS! -------------------- reverse
Para a Esquerda! ------------------ left
Para a Direita! -------------- right
Done auto-driving! Use motors to control motors in REPL

but the motors itsnt work i dont know what i need to do im using h-brigde L293D

the motor that im using is http://www.alltronics.com/mas_assets/acrobat/28M123.pdf

jremington:
(not Fritzing)

I could not help it. I snorted.
f.png

Read the "How to use this forum" post and use CODE TAGS when posting code, so it looks

like this.

The L293 chip can't handle the stall/startup current for that motor, 3.0 - 3.8 Amperes at 12V.

So what the correct current i need to use? A voltage 12v or 9v i dont know help me ^^

jremington:
Read the "How to use this forum" post and use CODE TAGS when posting code, so it looks

like this.

The L293 chip can't handle the stall/startup current for that motor, 3.0 - 3.8 Amperes at 12V.

So what the correct current i need to use? A voltage 12v or 9v i dont know help me because i'm looking the datasheet of L293D and i dont find how much i need to use ^^

OH understand now, i will change my motors sorry i dont saw the voltage of motors, so thanks so much

You can use those motors, but they will not work with the L293 driver. You need a better motor driver, similar to this one from Pololu.

The motor driver should be able to handle at least 5 Amperes per channel, and of course you will need a beefy motor power supply.