Step 1: What You Need?
1 x Arduino Mega Board
1 x Serial Enabled Device (a Xbee Radio, a Bluetooth module, or RFID Reader or another board, for instance).
1 x USB Type-B Cable
Female-to-Male Jumper Wires
You can buy Arduino Compatible UNO Ultimate Starter Kit / Learning Kit at here.
1 x Serial Enabled Device (a Xbee Radio, a Bluetooth module, or RFID Reader or another board, for instance).
1 x USB Type-B Cable
Female-to-Male Jumper Wires
You can buy Arduino Compatible UNO Ultimate Starter Kit / Learning Kit at here.
Don't have components? Don't worry. Just click the component's name.
Make sure that your Mega is connected to your computer, via USB, to enable serial communication.
Step 2: Build Your Circuit.
After checking the data sheet of whatever serial enabled device you choose to use for this example, make sure that it is both properly wired and powered. Connect the RX pin and TX pins of your device to the TX1 and RX1 pins of your Mega, as shown in the schematic below.Make sure that your Mega is connected to your computer, via USB, to enable serial communication.
Step 3: Upload The Code.
1. Select the Arduino board type: Select Tools >> Board >> Select your correct Arduino board used.
2. Find the port number by accessing device manager on Windows. See the section Port (COM&LPT) and look for an open port named "Arduino Uno (COMxx)". If you are using a different board, you will find a name accordingly. What matters is the xx in COMxx part. In my case, it's COM3. So my port number is 3.
Select the right port: Tools >> Port >> Select the port number.
3. You can find this code in the example of Arduino IDE.
Select File >> Examples >> 04.Communication >> MultiSerial
Select File >> Examples >> 04.Communication >> MultiSerial
Click press the "upload" button (see the button with right arrow mark).
This sketch assumes that you connect your serial enabled device is attached to TX1 and RX1.
Download:
Arduino IDE
Sources:https://www.arduino.cc/en/Tutorial/MultiSerialMega
0 comments:
Post a Comment