XYPlotter Laser pins


#1

I have my laser connected to M2 (which I think are actually pins 4 & 5).
In addition, I have the polarity reversed so it will also work with BenBox.

This means that in my Arduino code which is based off the MDraw code, I need to override the pins in use as just having MeDCMotor laser(M2); doesn’t work.

However, if I reverse the pins in setup() using:
laser.setpin(4,5);
Then this doesn’t work - the light on the Orion comes on but the laser doesn’t.

If I use:
laser.setpin(3,5); (or even laser.setpin(6,5); )
This works fine.

Note - using laser.setpin(5,3), means I can turn the laser on, but it comes on full power and I have to reset to turn it off.

Can anyone explain why?


#2

Hi AndyQ,

It is suggested to not modify the default settings and use the default firmware for the XY Plotter. Thanks!


#3

Indeed however the default firmware is lacking in a number of areas (limit pins not checked, etc). In addition I’ve written an OSX which has additional features to supported by the default firmware.

My question however was just why the laser pins aren’t working as expected!


#4

Hi AndyQ,

Is the main board on your XY plotter the Me Orion board? Please take a picture for the board.
Beside, when you compile the firmware, please make sure you have updated the makeblock library to the latest version.


#5

Yup its the Orion, and I’m using the latest makeblock library version.

Everything works fine, am just a little confused as to why the code needs to use the wrong pins in order for the laser to power correctly.


#6