-
• #2
I have capture a images for detail
1 Attachment
-
• #3
Forgive me if i am wrong, but it looks like you don't have your motors connected to a ground. You have them hooked up to an output that is powered.
-
• #4
Hi, Ducky thank for reply.
you are right i miss connect GND and "Bat" to Breadboard. -
• #5
I have Change my Circuit to the Following.
and update my code todigitalWrite(LED1,1); //Check the Board is Word for LED var outputs = [C6,C7,C8,C9]; digitalWrite(outputs[0],1); // output 1 digitalWrite(outputs[1],0); // output 2 digitalWrite(outputs[2],1); // output 3 digitalWrite(outputs[3],0); // output 4
But the Gearmotor is still not working
1 Attachment
-
• #6
Oh, i dind't spot that you hadn't connected the power to the espruino. What happens if you attach one of the motor terminals to GND?
-
• #7
i found this, http://fritzing.org/projects/arduino-l293d its for arduino but it might help you.
-
• #8
@Ducky The idea of the L293D is that the motor can have both sides connected to the controller - so you can run the motor in reverse.
@jacklee that circuit and code looks absolutely fine to me. Is the motor rated for 5v, or some higher voltage? Perhaps you could check with a meter and see if one side of the motor really is at 5v, and the other is at gnd?
-
• #9
@Ducky Thank You for you information and reply.
@Gordon I found my problem but still have one issue for me.First: in bread board, power circuit(+,-)is separated at half point so i need to make the far right two wire near.
The unsolved issue is i can't solve when i using [C6,C7,C8,C9] or [C6,C7,C4,C5]
the motor is not work properly.
Example if i using [C6,C7,C8,C9] and code like below . the motor should be stop,
but one of the motor is still workingvar outputs = [C6,C7,C4,C5]; digitalWrite(outputs[0],0); // output 1 digitalWrite(outputs[1],0); // output 2 digitalWrite(outputs[2],0); // output 3 digitalWrite(outputs[3],0); // output 4
I need to code like below to stop both of the motor
var outputs = [C6,C7,C4,C5]; digitalWrite(outputs[0],0); // output 1 digitalWrite(outputs[1],0); // output 2 digitalWrite(outputs[2],0); // output 3 digitalWrite(outputs[3],1); // output 4
I have testing few hours in [C6,C7,C8,C9] and [C6,C7,C4,C5] this two group.
but the result is same all not work properly for me.After few hours I change my Circuit PIN to B3,B4,B5,B6
Like the Attach Images belowand code like below is work properly for me
Both motor is Run
var outputs = [B3,B4,B5,B6]; digitalWrite(outputs[0],0); // output 1 digitalWrite(outputs[1],1); // output 2 digitalWrite(outputs[2],0); // output 3 digitalWrite(outputs[3],1); // output 4
Both motor is Stop
var outputs = [B3,B4,B5,B6]; digitalWrite(outputs[0],0); // output 1 digitalWrite(outputs[1],0); // output 2 digitalWrite(outputs[2],0); // output 3 digitalWrite(outputs[3],0; // output 4
I have No Idea why the PIN in the "C" is not working properly but the PIN in "B" is working Good?
1 Attachment
-
• #10
I'm afraid I have no idea! I just tested here and C4/5/6/7 outputs output the correct values with digitalWrite.
Maybe there is some kind of short on your board, but we test for that in manufacturing. Can you check the outputs with an LED (L293D doesn't have to be connected) and see if they output the correct values?
-
• #12
Great, thanks for letting me know!
-
• #16
I must to say that I inspired by Espruino (because of JavaScript) to learn new interesting things. Thank you.
-
• #18
:/ Sorry to be posting this out of nowhere, but could you please share the fritzing part for the micrometal motors? I can't seem to find them anywhere. TIA
Hello,
I using a L293D chip(16 pin) to control two 298:1 Micro Metal Gearmotor.
the following attach files is my Circuit.
Any i refer the http://www.espruino.com/L293D and write my code like below
but when send to Espruino to LED is LightUp but the GearMotor still not work is it any step i missing?
1 Attachment