You can download this example code to your Arduino UNO...
Make sure the baud rate on the line
mySerial.begin(4800) to match the baud rate your device is sending.
Then run "Serial Terminal" from the Arduino IDE and connect the output of your device to pin 10 on the Arduino.
If the baud rate is correct, you should see the Serial output from your device in the serial terminal window.
Why you might not want to direct connect
Here is the schematic of the serial port section of the Arduino UNO...
The TX pin on the header is connected directly connected to the TXD/PD1 pin on the ATMEGA chip as highlighted in red. This pin will be actively driven if any of the following happen...
- There is a sketch running on the Arduino than enables the serial port (i.e. includes
- There is a sketch running on the Arduino that enables pin 1 as output (i.e. includes
- The Arduino reboots and runs the bootloader, which always briefly enables the serial port on startup.
There are some devices that can be permanently damaged by having their serial output tied to an actively driven signal, especially a +5 volt one like we have here. The BBB is one of them (I know from experience!).
One response suggested downloading the
BlinkMe sketch into the Arduino, presumably to make sure there is not another sketch running that could enable the serial port. This is the right idea, but you have to keep in mind that the UNO will reboot anytime the RTS line is toggled. Here is a not-so-far-fetched scenario...
- You load
BlinkMe into the UNO.
- You connect the device to the TX pin on the UNO.
- You launch
Tools-Serial Monitor from the Arduino IDE to see the serial data.
- The Serial Monitor window opens and toggles the RTS line (does this every time you launch it).
- The UNO reboots.
- The bootloader runs and enables the serial port on the ATMEGA.
- The connected device is cooked.
Also keep in mind that even if the attached device can tolerate being connected to an actively driven signal, once you connect another signal to the Arduino TX pin then you loose the ability to communicate with the Arduino.
Softserial sketch takes the same number of steps as loading the
BlinkMe sketch, reduces the chance of of damaging the connected device, and also allows you to keep access to the Arduino while you are doing all this.