[SOLVED] MKR motor shield questions

I'm a bit new to arduino stuff, but a bit old in reality :slight_smile: I have a couple of questions about the MKR motor shield that I hope somebody can help with ... My arduino controller is a MKR 1010 Wifi.

I'm building a robot, currently using two DC motors, and two servos. Controlling them has been relatively straight forwards, I'm using M1/M2 for the motors, and using motors with encoders for positional control.

I would like to utilise a radio-control RX that I have to provide control for the movable parts. Reading up on this, it would seem relatively easy, I can sample the 'servo-control' pins on the RX unit with the pulsein() function, convert that to a usable control signal, and command the motors/servos on my robot to do stuff.

My question relates to which pins can I use for this input ?

The MKR motor shield has 4 x 3 pin 'inputs' labelled IN1 / IN2 / IN3 / IN4, these go thro' the LS108 level converter to get shifted to 3V3 and then re-named A1 / A2 / A5 / A6. The A1... converted inputs seem to go to what I think is the connector block linking the MKR motor carrier with the arduino 1010.

So can I use the signals on A1 / A2 / A5 / A6 directly as inputs to pulsein() ? If so, what is the pin number as required by pulsein() ?

My confusion on this is due to the fact the pin 'A1' on the MKR motor carrier, is labelled as 'AIN[10] / PB02 / A1 / D16' on the arduino schematic.

-- Chris

So I got to the bottom of my difficulties with this .. user error. I was mis-reading the schematic.

I had traced the INx signal lines, but had mentally connected them up to the wrong Ax input lines. This is how they are connected.

IN1 -> A6 IN2 -> A1
IN3 -> A5 IN4 -> A2

My code was trying to read pulses from the wrong A pin :frowning:

-- Chris

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