I'm just beginning my research on the Arduino market and I wanted to ask a question here to confirm whether or not I'm going to purchase the correct Arduino board I need.
The project I'm beginning is based off of two portions, a USB communication input and a Rx/Tx output to a Bluetooth Shield. My question here specifically is this, using the Arduino Mega USB host port...can I read/write data from it and then "forward/receive" that same data through the Rx/Tx pins on the board to a Bluetooth Shield?
Thanks for the help! Let me know if this question needs to be stated more clearly.
No. The data you send out on Tx will go back out to the USB. The Rx pin will see Tx data from the Bluetooth and Tx data coming from the USB and be corrupted.
Use Serial1, Serial2, or Serial3 to connect to the bluetooth shield instead.
Ok, great. If I'm understanding you correctly...the Tx/Rx (pins 0 and 1) are tied to the USB host interface?
So I should be able to read the USB serial I/O (pins 0 and 1) and "relay" the data appropriately to either the Serial1, Serial2, or Serial3 ports that are provided by the Arduino Mega?
Do you happen to know if there is a specific function to read from the Tx/Rx of pins 0 and 1 in comparison from Serial1, Serial2, Serial3?
Crossroads,
Is there any reason the onboard USB port could not be used by the arduino application ?
(provided of course , if you wanted to debug the serial you would have to use some other serial port for your serial monitoring )
If all you do is to make Arduino MEGA take data from USB serial and send to a BT module, then why don't you just purchase a USB TTL adapter and wire it to the BT module, saving the MEGA, and a BT shield? I see no reason you need a microcontroller development board for what simple wiring can do.