1
\$\begingroup\$

Simply put I have the following:

Arduino Uno

With a

SainSmart L293D Motor Drive Shield

Plugged into it

Now the last part needed is to hook up my

bluetooth module

so I can control the Motor Drive shield.

Here's the problem though, the Motor shield uses

EVERY SINGLE DIGITAL PIN ON THE ARDUINO!

I have

5 analog pins

open though.

Am I able to turn analog pins into TX and RX for the bluetooth??

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

The short answer is yes. The only part of the "analog" pin that makes it analog is that if you want you can use them as inputs to the internal ADC. That said you can use them like any regular I/O. The tricky part here is that you won't have the ability to use hardware serial port (since you say that the motor driver takes all the other pins). Therefore you'll need to implement this in software. I believe there's already an arduino library called "software serial" so 99% of the work is done. You'll have to double check that the bluetooth module uses a uart interface. It looks like it's 9600 bps so that shouldn't be hard to handle in software. Check start/stop bits etc. Ultimately you'll have to see if your software loop can keep up with both the motor driver and the radio. This will depend of course on how much data you're sending/receiving and how often you're servicing the motor driver. You should probably be OK.

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.