I can’t get soft serial to output from a port but the port is working.
I check the port by sending
digitalWrite(SoftTXPort, HIGH); // show that the port is ok
delayMicroseconds(10);
digitalWrite(SoftTXPort, LOW);
They are seen on a CRO but the SoftSerial.println(" is not being sent from the port -
#include <SoftwareSerial.h>
int SoftTXPort=6;
int SoftRxPort=7;
int SoftTXPIN=9;
int SoftRxPIN=10;
SoftwareSerial SoftSerial(SoftRxPIN, SoftTXPIN); // RX, TX
int BeepHz; // this existing variable will be recycled for the test
void setup()
{
// SoftSerial.begin(115200);
SoftSerial.begin(1200); // low rate is easier to see on the cro
// pinMode(9, OUTPUT);
// pinMode(10, INPUT); // Soft Serial Rx
BeepHz=800; // this existing variable will be recycled for the test
while (BeepHz==BeepHz){ // recycled BeepHz for this temp test
digitalWrite(SoftTXPort, HIGH); // show that the port is ok
delayMicroseconds(10);
digitalWrite(SoftTXPort, LOW);
delayMicroseconds(10);
digitalWrite(SoftTXPort, HIGH);
delayMicroseconds(10);
digitalWrite(SoftTXPort, LOW);
delayMicroseconds(10);
digitalWrite(SoftTXPort, HIGH);
delayMicroseconds(10);
digitalWrite(SoftTXPort, LOW);
delayMicroseconds(100);
if (SoftSerial.available()) {SoftSerial.println("5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A");
}
if (SoftSerial.available()) {
SoftSerialRead=SoftSerial.read();
}
delay(100);
if (SoftSerial.available()) {SoftSerial.println("AT+CGSN");
}
if (SoftSerial.available()) {
SoftSerialRead=SoftSerial.read();
}
if (SoftSerial.available()) {SoftSerial.println("AT+CGSN");
}
if (SoftSerial.available()) {
SoftSerialRead=SoftSerial.read();
}
} // while

