0

I want to connect an arduino uno both to a TGAM module: http://www.seeedstudio.com/document/pdf/TGAM%20Datasheet.pdf and a bluetooth shield. The arduino is to receive data from the TGAM module and sent it to an android device. The problem is I should connect the bluetooth and the TGAM to the same pins on the arduino. Is that a problem (I am still a novice, doing my research)? If it is a problem what is the work around?

Arduino <> TGAM

Arduino RX (0) <> TGAM T (TX)

Arduino TX (1) <> TGAM R (RX)

Arduino 3.3V <> TGAM + (VCC)

Arduino GND <> TGAM - (GND)

Arduino <> HC-06

3.3v <> VCC

GND <> GND

TXD <> RXD

RXD <> TXD

  • if the tgam only uses RX and the BT only TX, that can work; – dandavis Apr 8 '17 at 21:39
3

No, you cannot use one pin (or set of pins) for two functions like that.

To communicate with two serial devices you will need two serial ports. It's possible to (just about) emulate one in software using the SoftwareSerial library. It's not wonderful though - personally I would use a chip that has multiple UARTs in it.

| improve this answer | |
  • Thank you for the answer. But what about the GND and 3.3v pins. Can I emulate those too? – B.Parvi Apr 9 '17 at 17:15
  • 1
    No. They aren't IO pins, they are just voltage levels. Wire as many things to those as you like. The fact you are having to ask these questions shows you lack the fundamental knowledge to be working with electronics. You are trying to run before you have even been born. – Majenko Apr 9 '17 at 17:35
  • Would agree and would appreciate if you share with me a nice source for learning the fundamentals. And remember everyone has to go through the stage of being born. – B.Parvi Apr 9 '17 at 18:02
  • For those who might need it in the future: arduino.cc/en/Tutorial/TwoPortReceive – B.Parvi Apr 9 '17 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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