I am using the TFMPlus library to setup an obstacle sensor using TF Luna LiDAR sensor. I am using the example program to begin with.
The code sets up the serial port as shown below: #include <SoftwareSerial.h>
SoftwareSerial mySerial( 10, 11);
It works only with those pins (10,11) and does not work with any other combination of PWM digital pins (such as 7 & 8 or 6 & 7). And, I am using Arduino mega. For some reason I have to use SoftwareSerial for this sensor, though there are 3 HardwareSerial ports...
Am I missing anything? Any help is highly appreciated...