I am testing the output on the motor outputs (M1 and M2). I have connected a small 12v fan to the output. Unfortunately I do not get any power output. I have also checked it with a voltmeter. Both M1 and M2 stay at 0v.
This is the code I am using to test it, it should set power to both outputs (M1 and M2):
#include <MeOrion.h>
// Test routine for the DCMotors M1 & M2.
MeDCMotor motor1(M1);
MeDCMotor motor2(M2);
void setup() {
Serial.begin(115200);
Serial.println("Start test: Send a number between -255 en 255 to set motorspeed:");
}
int iMotorSpeed = 0;
void loop() {
// Read serial input:
while (Serial.available() == 0) { }
int iMotorSpeed = Serial.parseInt();
if (iMotorSpeed>255) iMotorSpeed=255;
if (iMotorSpeed<-255) iMotorSpeed=-255;
Serial.print("Motor speed = ");
Serial.println(iMotorSpeed);
motor1.run(iMotorSpeed);
motor2.run(iMotorSpeed);
}
Some answers you may have to my setup:
- The 12V adapter is connected and the switch is ON
- The fan is rated 12V 0.15A (should be no problem at all, and does work)
- The plotter is working well, X-Y steppen motors work as they should.
- Software like mDraw v1.21 works fine. Is has already created some nice drawings.
- I my second idea was using the laser setting (in mDraw) to set power to M2. Unfortunately same result, does not work either)
I am a bit in doubt now if my board is broken. Is the test code I am using correct?
Any other suggestions?
Any help is highly appreciated.
Kind regards, Klaas