Q&A
Q&A
Q&A
Q&A
If you use Arduino M e g a 1280/25 6 0 or Freaduino ADK there are some
differen ce . Please note the NewSoftSerial library about M e g a 2560 explanation
in SoftwareSerial.cpp :
// Specifically for the Arduino Mega 2560 (or 1280 on the original Arduino Mega)
// majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins)
// Only pins available for RECEIVE (TRANSMIT can be on any pin):
// (I've deliberately left out pin mapping to the Hardware USARTs - seems senseless to me)
// Pins: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
That mean s the library do not support D0-D7 as receiv ing pins, and you just
could use pins:10,
11,
12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69 for
receiv ing . So there are two way to resolve it, but they all need external jumper
wires.
First
First
First
First method
method
method
method : Change the define of rxPin and txPin. Jumper wires connect to
DOUT-D10, DIN-D11.
#define rxPin 10
#define txPin 11
Second
Second
Second
Second method
method
method
method : Use the other Hardware Serial port because M ega has 4
hardware serial port s . Jumper wires connect to DOUT-RX1(D19)
DIN-TX1(D18)