Makeblock-official/Makeblock-Libraries

Me High Power Encoder Motor Driver and 36mm Encoder Motor Drivers - Example Code Doesn't Work

baclark774 opened this issue · 1 comments

The below code works fine for the regular encoder motor driver but not with the high power encoder motor driver with 36mm motors. Can you provide working code?

#include "MeOrion.h"
#include <Wire.h>
#include <SoftwareSerial.h>

MeEncoderMotor motor2(0x09, SLOT2); // motor at slot2

void setup()
{
motor2.begin();
Serial.begin(9600);
}

void loop()
{
motor2.runSpeed(-150);
delay(3000);
motor2.runSpeed(0);
delay(2000);
}

The Me High Power Encoder Motor Driver code should be use the class MeEncoderNew.
example:
#include "MeOrion.h"
#include <Wire.h>
#include <SoftwareSerial.h>

MeEncoderNew motor2(0x09, SLOT2); // motor at slot2

void setup()
{
motor2.begin();
Serial.begin(9600);
}

void loop()
{
motor2.runSpeed(-150);
delay(3000);
motor2.runSpeed(0);
delay(2000);
}

the more example in the folder makeblock\examples\Me_EncoderDriver_New