Hello,
I wired the two encoder motors and use the MeEncoder Motor Driver , use 6x1.5V batteries. When i upload the example the motors stay dead… There is a red led glowing on the encoder board. Who can help me?
Motors don't work
Hi Aant,
Which main board you use to work with the encoder motor?
You may test with the mBlock program and see if the encoder motors can rotate to check if the motors are ok.
Hello,
I use the orion mainboard. Using the makeblock example code for the Me_EncoderDriver_new aswell as the code for the Me_EncoderDriver_old both motors don’t spin.
If I spin the motors there is a little blue led on the Me_encoder_driver board flashing on/off. The spinning by myself isn’t “easy”.
For external power I use 6 rechargeable batteries.
I tried also the 180 Optical Encoder Motors with the same result, no spinning.
with regards
Hi Aant,
Make sure that you have connected the encoder motor driver to the correct port on Orion board. You may take a picture to show the wires connections between the Orion board, encoder motor driver and the encoder motor.
Please also show the mBlock program you have test for the encoder motor.
Hello ,
Here is the code:
/**
- \par Copyright ©, 2012-2016, MakeBlock
- @file EncoderMotorTestRunSpeed.ino
- @author MakeBlock
- @version V1.0.0
- @date 2015/11/19
- @brief Description: this file is sample code for Encoder Motor device.
- Function List:
-
- void MeEncoderMotor::begin();
-
- boolean MeEncoderMotor::runSpeed(float speed);
- \par History:
-
- forfish 2015/11/19 1.0.0 add some descriptions
*/
#include “MeOrion.h”
#include <Wire.h>
#include <SoftwareSerial.h>
MeEncoderNew motor1(PORT_2, SLOT1); // motor at slot1
MeEncoderNew motor2(PORT_2, SLOT2); // motor at slot2
void setup()
{
motor1.begin();
motor2.begin();
//motor1.runSpeed(0);
//motor2.runSpeed(0);
//Serial.begin(9600);
}
void loop()
{
motor1.runSpeed(150);
motor2.runSpeed(150);
delay(3000);
//motor1.runSpeed(0);
//motor2.runSpeed(0);
//delay(2000);
}
Hi Aant,
From the picture, you connected the motor driver to Port 1 on the Orion board. While you chose Port 2 in your program.
Could you please temporarily disassemble the Metal Mechanical parts from the encoder motors and then try the following program:
Before you upload the above program, it is suggested to Upgrade Firmware for the Orion board first. Please refer to this instruction to upgrade firmware for the Orion board first.4. How to upgrade firmware for Orion Board.docx.zip (393.9 KB)
Hello,
When i use the presented code (after upgrading the firmware) the motors still doesn’t spin.
When i use an arduino board with a Me_Uno shield attached on it and use the presented code the motors spin. So i can conclude the driver and the motors are working good.
With regards
Aant
Hello,
The motors still don’t run with a Orion board. When I used a Arduino board with the Me_Uno shield the motors did their work. But all of a sudden i get a error during compiling/downloading:
In file included from C:\Users\bwaant\AppData\Local\Temp\arduino_modified_sketch_221013\EncoderMotorTestMoveTo.ino:21:0:
C:\Users\bwaant\surfdrive\arduino\libraries\makeblock\src/MeShield.h:72:21: error: conflicting declaration ‘MePort_Sig mePort [15]’
MePort_Sig mePort[15] =
^
In file included from C:\Users\bwaant\surfdrive\arduino\libraries\makeblock\src/MeDCMotor.h:51:0,
from C:\Users\bwaant\surfdrive\arduino\libraries\makeblock\src/MeShield.h:41,
from C:\Users\bwaant\AppData\Local\Temp\arduino_modified_sketch_221013\EncoderMotorTestMoveTo.ino:21:
C:\Users\bwaant\surfdrive\arduino\libraries\makeblock\src/MePort.h:76:19: note: previous declaration as ‘MePort_Sig mePort [17]’
extern MePort_Sig mePort[17]; // mePort[0] is nonsense
It looks like a error is in the libs (version 3.24, downloaded early this week). Who can shet some light on this error.
And is there a solution for the not working of the encodermotor witht eh Orion board?
With regards
Aant
complete error:
In file included from C:\Users\bwaant\AppData\Local\Temp\arduino_modified_sketch_221013\EncoderMotorTestMoveTo.ino:21:0:
C:\Users\bwaant\surfdrive\arduino\libraries\makeblock\src/MeShield.h:72:21: error: conflicting declaration ‘MePort_Sig mePort [15]’
MePort_Sig mePort[15] =
^
In file included from C:\Users\bwaant\surfdrive\arduino\libraries\makeblock\src/MeDCMotor.h:51:0,
from C:\Users\bwaant\surfdrive\arduino\libraries\makeblock\src/MeShield.h:41,
from C:\Users\bwaant\AppData\Local\Temp\arduino_modified_sketch_221013\EncoderMotorTestMoveTo.ino:21:
C:\Users\bwaant\surfdrive\arduino\libraries\makeblock\src/MePort.h:76:19: note: previous declaration as ‘MePort_Sig mePort [17]’
extern MePort_Sig mePort[17]; // mePort[0] is nonsense
Hi Aant,
Which mBlock version do you use when upload the program?
You may uninstall and delete all the previous softwaredownload the latest version mBlock 3.3.8 and run the program again have a check:http://learn.makeblock.com/en/software/
Besides, you may download the latest version makeblock Library from this link: https://github.com/Makeblock-official/Makeblock-Libraries/archive/master.zip
Replace the previous makeblock file with the new one under the libraries file of the Arduino’s installation path.