Pins remaining for Serial Tranmission
Posted: 03 Jun 2023 17:16
I am trying to transmit data from the uno with the lambda 2 shield to a teensy 4.1.
Without the shield I can transmit data from the uno to the teensy using the <SoftwareSerial.h> library, pins 11 and 12 are used for RX TX on the uno.
When using the shield and adding the required lines for Software Serial to the example code of the lambda 2 shield, I get the following error:
CJ125 = 0xFFFFE8FF
to counter this error i use the following lines of code where required :
This quick fix lets the sensor heat up and read lambda and oxygen correctly. However the Software Serial is not working from pins 11 and 12.
The code for Software Serial is :
Any ideas on why the Software Serial communication isn't working?
It starts working once I remove all the code for SPI communication with the CJ125 chip. This is a temporary solution as I would like to get diagnostics data. Any ideas on how to make Software Serial work and the SPI communication with the CJ125 together?
Without the shield I can transmit data from the uno to the teensy using the <SoftwareSerial.h> library, pins 11 and 12 are used for RX TX on the uno.
When using the shield and adding the required lines for Software Serial to the example code of the lambda 2 shield, I get the following error:
CJ125 = 0xFFFFE8FF
to counter this error i use the following lines of code where required :
Code: Select all
#define CJ125_PROBLEM_WITH_SERIAL 0xFFFFE8FF
if(CJ125_Status == CJ125_PROBLEM_WITH_SERIAL)
CJ125_Status = CJ125_DIAG_REG_STATUS_OK;
The code for Software Serial is :
Code: Select all
#include <SoftwareSerial.h>
SoftwareSerial mySerial(11, 12);
void setup() {
//Set up serial communication.
mySerial.begin(57600);
}
void loop(){
mySerial.write(LAMBDA_VALUE);
}
It starts working once I remove all the code for SPI communication with the CJ125 chip. This is a temporary solution as I would like to get diagnostics data. Any ideas on how to make Software Serial work and the SPI communication with the CJ125 together?