I'm sure this has been addressed but I'm having difficulty finding a direction answer. I have the UNO R3 board and need it to receive a command by serial via a com port of a computer.
For my system though this board will be powered by external 12VDC, which means it can not be connected via USB, and I need it to receive a string from labview running on a NI PXI computer (no need to transmit). The UNO will power on/off this computer with an external relay, basic micro B0096 power switch, that is programmed and works great when the UNO is connected via USB to my laptop and I send a string to it.
I have two questions:
1.) Can the UNO be connected directly to the com port of the computer or does it need an addition board for this communication? What is that board if needed?
2.) Can the UNO be connected to the com port of the PXI computer and by USB to my laptop at the same time if no additional board is needed? With the additional board?
The Uno has only one serial port, that is the (virtual) serial port via the usb connector.
Other boards like the Mega, Leonardo, Micro have an extra serial port.
But if you use SoftwareSerial, you can create a new serial port on other pins.
With that library you can use the serial device and the serial monitor of the Arduino at the same time.
If you use external 12V, why can't you use the USB to the computer ?
The Arduino Uno uses a ATmega328P microcontroller. It runs at 5V, so all the digital outputs and inputs are 0V to 5V level signals.
The serial data is therefor 5V TTL-level serial data.
You can not connect that to the higher voltage levels of a RS232 port.
You have to use an adapter. The MAX232 or MAX3232 is the most used chip for that.