Problems wiring DC Encoder motor to MegaPi


#1

Hello, I am currently trying to connect a DC Encoder Motor (https://www.robotroom.com/FaulhaberGearmotor.html) to the MegaPi using the MegaPi Pro Encoder/DC Motor Driver v1.0. So far the only indication that it is working is that I can get a 5V reading from the 5V pin; I have not been able to read encoder values or drive a motor. Not sure if the problem is hardware or software: this is the code I am using to test the motor:

#include “MeMegaPi.h”

MeEncoderNew motor1(0x09, SLOT1);

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

void loop() {
motor1.moveTo(360, 200, 1);
delay(2000);
motor1.moveTo(0, 100, 1);
delay(2000);
}

Am I using the right class? And what do the driver pinouts correspond to on a normal encoder motor? I assume NET1 and NET2 and Channel A and Channel B, and BO1 and BO2 are M+ and M- based on another forum post, but as I haven’t been able to get an readings on a multimeter I’m not sure if this wiring is correct.


#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.