MeLimitSwitch always down


#1

Hi everyone,

if I declare a limit switch like this:

MeLimitSwitch limitSwitch1(PORT_7, SLOT1);      // connecte to Me RJ25 Adapter SLOT1
MeLimitSwitch limitSwitch2(PORT_7, SLOT2);      // connecte to Me RJ25 Adapter SLOT2

and I check if limitSwitch1 is touched without connecting any cable to SLOT1, it keeps telling me that limitSwitch1 is touched.

Why???


#2

Here comes the weird part. Port 3 and 6 were already set up for XY plotter to handle bot the slots. For Port 7 there was just the servo on slot 2.
How can I override this behaviour? Where is it specified?

Diego


#3

Hi Braghettos,

The wires part are correct.
Please download the resources for XY Plotter in this link: http://learn.makeblock.com/xy-plotter-robot-kit/
You can upgrade the firmware for XY with the latest mDraw software.


#4

you are not able to give PORT_7 a different behavior. Only 3 and 6 are reserved for limit switches (or configured as such) The only chance is to manually setup the pins by yourself using pinMode.


#5