Skip to main content
replaced http://arduino.stackexchange.com/ with https://arduino.stackexchange.com/
Source Link

You can download this example code to your Arduino UNO...

https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

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...

enter image description here

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...

  1. There is a sketch running on the Arduino than enables the serial port (i.e. includes Serial.begin()).
  2. There is a sketch running on the Arduino that enables pin 1 as output (i.e. includes pinMode(1,OUTPUT);).
  3. 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 toggledreboot anytime the RTS line is toggled. Here is a not-so-far-fetched scenario...

  1. You load BlinkMe into the UNO.
  2. You connect the device to the TX pin on the UNO.
  3. You launch Tools-Serial Monitor from the Arduino IDE to see the serial data.
  4. The Serial Monitor window opens and toggles the RTS line (does this every time you launch it).
  5. The UNO reboots.
  6. The bootloader runs and enables the serial port on the ATMEGA.
  7. 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.

Loading the 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.

You can download this example code to your Arduino UNO...

https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

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...

enter image description here

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...

  1. There is a sketch running on the Arduino than enables the serial port (i.e. includes Serial.begin()).
  2. There is a sketch running on the Arduino that enables pin 1 as output (i.e. includes pinMode(1,OUTPUT);).
  3. 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...

  1. You load BlinkMe into the UNO.
  2. You connect the device to the TX pin on the UNO.
  3. You launch Tools-Serial Monitor from the Arduino IDE to see the serial data.
  4. The Serial Monitor window opens and toggles the RTS line (does this every time you launch it).
  5. The UNO reboots.
  6. The bootloader runs and enables the serial port on the ATMEGA.
  7. 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.

Loading the 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.

You can download this example code to your Arduino UNO...

https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

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...

enter image description here

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...

  1. There is a sketch running on the Arduino than enables the serial port (i.e. includes Serial.begin()).
  2. There is a sketch running on the Arduino that enables pin 1 as output (i.e. includes pinMode(1,OUTPUT);).
  3. 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...

  1. You load BlinkMe into the UNO.
  2. You connect the device to the TX pin on the UNO.
  3. You launch Tools-Serial Monitor from the Arduino IDE to see the serial data.
  4. The Serial Monitor window opens and toggles the RTS line (does this every time you launch it).
  5. The UNO reboots.
  6. The bootloader runs and enables the serial port on the ATMEGA.
  7. 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.

Loading the 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.

added 2049 characters in body
Source Link
bigjosh
  • 1.6k
  • 10
  • 13

You can download this example code to your Arduino UNO...

https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

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...

enter image description hereenter image description here

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...

  1. There is a sketch running on the Arduino than enables the serial port (i.e. includes Serial.begin()).
  2. There is a sketch running on the Arduino that enables pin 1 as output (i.e. includes pinMode(1,OUTPUT);).
  3. The Arduino happens to rebootreboots 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, for example theespecially 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 CTS line is toggledreboot anytime the RTS line is toggled. Here is a not so far fetched-so-far-fetched scenario...

  1. You load BlinkMe into the UNO.
  2. You connect the device to the TX pin on the UNO.
  3. You launch Tools-Serial Monitor from the Arduino IDE to see the serial data.
  4. The Serial Monitor window opens and toggles the CTSRTS line (does this every time you launch it).
  5. The UNO reboots.
  6. The bootloader runs and enables the serial port on the ATMEGA.
  7. 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.

Loading the 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.

You can download this example code to your Arduino UNO...

https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

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...

enter image description here

The TX pin on the header is connected directly connected to the TXD/PD1 pin on the ATMEGA chip. This pin will be actively driven if...

  1. There is a sketch running on the Arduino than enables the serial port (i.e. includes Serial.begin()).
  2. There is a sketch running on the Arduino that enables pin 1 as output (i.e. includes pinMode(1,OUTPUT);).
  3. The Arduino happens to reboot 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, for example the BBB (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 CTS line is toggled. Here is a not so far fetched scenario...

  1. You load BlinkMe into the UNO.
  2. You connect the device to the TX pin on the UNO.
  3. You launch Tools-Serial Monitor from the Arduino IDE to see the serial data.
  4. The Serial Monitor window opens and toggles the CTS line (does this every time you launch it).
  5. The UNO reboots.
  6. The bootloader runs and enables the serial port on the ATMEGA.
  7. 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.

Loading the 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.

You can download this example code to your Arduino UNO...

https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

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...

enter image description here

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...

  1. There is a sketch running on the Arduino than enables the serial port (i.e. includes Serial.begin()).
  2. There is a sketch running on the Arduino that enables pin 1 as output (i.e. includes pinMode(1,OUTPUT);).
  3. 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...

  1. You load BlinkMe into the UNO.
  2. You connect the device to the TX pin on the UNO.
  3. You launch Tools-Serial Monitor from the Arduino IDE to see the serial data.
  4. The Serial Monitor window opens and toggles the RTS line (does this every time you launch it).
  5. The UNO reboots.
  6. The bootloader runs and enables the serial port on the ATMEGA.
  7. 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.

Loading the 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.

added 2049 characters in body
Source Link
bigjosh
  • 1.6k
  • 10
  • 13

You can download this example code to your Arduino UNO...

https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

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...

enter image description here

The TX pin on the header is connected directly connected to the TXD/PD1 pin on the ATMEGA chip. This pin will be actively driven if...

  1. There is a sketch running on the Arduino than enables the serial port (i.e. includes Serial.begin()).
  2. There is a sketch running on the Arduino that enables pin 1 as output (i.e. includes pinMode(1,OUTPUT);).
  3. The Arduino happens to reboot 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, for example the BBB (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 CTS line is toggled. Here is a not so far fetched scenario...

  1. You load BlinkMe into the UNO.
  2. You connect the device to the TX pin on the UNO.
  3. You launch Tools-Serial Monitor from the Arduino IDE to see the serial data.
  4. The Serial Monitor window opens and toggles the CTS line (does this every time you launch it).
  5. The UNO reboots.
  6. The bootloader runs and enables the serial port on the ATMEGA.
  7. 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.

Loading the 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.

You can download this example code to your Arduino UNO...

https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

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.

You can download this example code to your Arduino UNO...

https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

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...

enter image description here

The TX pin on the header is connected directly connected to the TXD/PD1 pin on the ATMEGA chip. This pin will be actively driven if...

  1. There is a sketch running on the Arduino than enables the serial port (i.e. includes Serial.begin()).
  2. There is a sketch running on the Arduino that enables pin 1 as output (i.e. includes pinMode(1,OUTPUT);).
  3. The Arduino happens to reboot 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, for example the BBB (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 CTS line is toggled. Here is a not so far fetched scenario...

  1. You load BlinkMe into the UNO.
  2. You connect the device to the TX pin on the UNO.
  3. You launch Tools-Serial Monitor from the Arduino IDE to see the serial data.
  4. The Serial Monitor window opens and toggles the CTS line (does this every time you launch it).
  5. The UNO reboots.
  6. The bootloader runs and enables the serial port on the ATMEGA.
  7. 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.

Loading the 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.

Source Link
bigjosh
  • 1.6k
  • 10
  • 13
Loading