error while using SoftwareSerial on teensy 4.0

Status
Not open for further replies.

stvallas123

New member
Hi everyone,

when I type
Code:
#include <SoftwareSerial.h>
then I run my code I get this weird error that states:

Code:
error: 'Serial8' was not declared in this scope

   port = &Serial8;

           ^

I haven't even initialized a SoftwareSerial object yet and I am getting this error so I am very confused. when I comment out the #include line out of my code, it works perfectly fine. I didn't know what was wrong so i uninstalled arduino and everything and reinstalled it but I still got the same error. If anyone has had a similar thing happen to them please help me out.

thanks
 
Looks like a bug in SoftwareSerial... In particular

Serial8 existed in the T4 beta 1 board, but not in the Beta 2 board... So looks like we need to update it here... I will try to get in a Pull Request to fix.

But until then you can edit your softwareSerial.cpp I believe lines 74-76
Code:
	} else if (rxPin == 30 && txPin == 31) {
		port = &Serial8;
		return;
Simply delete those 3 lines of code...

EDIT:
Also required a change to .h file as well as we did not update a #if to apply to 1062 chips as well


Did Pull Request: https://github.com/PaulStoffregen/SoftwareSerial/pull/7
 
Status
Not open for further replies.
Back
Top