MOtor shield & pin 13

I just ordered a motor shield and was reading through the notes on how to use it and I see that channel B uses pin 13 to control the motor direction. Isn't that the same as the on-board LED? Does it cause issues with the led? Do I need to disable the led?

While I am at it, can the on-board digital inputs be used if they are the same as the inputs needed for the motor shield? In other words, if digital inputs 3, 8, 9, 10, 11 & 13 are used by the motor shield, and I have three ultra-sonic sensors, each of which require two digital pins, say 1, 2, 4, & 5, and I also want to have some status LEDs, 6, 7, 12, I am now out of inputs for any other sensors, correct? Or can I use the motor shield pins, even though they are used internally? Does that even make sense? I am thinking no, I cannot use the pins 3, 8, 9, 10, 11 & 13 since the motor shield will use them internally.

I need to learn how to count. I have three ultrasonic sensors, each of which needs two pins, so I could could use 1, 2, 4, & 5 and I am two pins shy. Unless I can use the board pins that share the same numbers as the motors, I am going to need more pins. Can I use analog pins as digital pins? Other alternatives?

Correct, you cannot normally use the pins for 2 purposes at once, especially output to the motor, and input from something else.

Re: pin 13, the LED will just flash if you use the pin. No harm, no foul. If it bothers you, you can cover it up, or take it off the board.

If you need more pins, you can step up in microcontrollers - say a Atmega1284, with 32 IO

http://www.crossroadsfencing.com/BobuinoRev17/
offboard USB interface, or onboard with an MIKROE483 module ($8.75)

Also, analog pins are also digital: A0 = 14, A1 = 15, ... A5 = 19

Got it! Thanks for the help :slight_smile: