Page 2 of 2
Re: Trouble declaring hardware serial... And Serial3 not declared in this scope
Posted: Sun Oct 18, 2020 1:08 pm
by stevestrong
You just have to use defines like this:
Serial1,2,3 are already defined with default pins in the core.
Re: Trouble declaring hardware serial... And Serial3 not declared in this scope
Posted: Sun Oct 18, 2020 2:03 pm
by Mangy_Dog
Thats what i was doing, till serial3 stopped working... I just felt if i could redefind the hardware for serial 3 if it came back id be able to fix it
Re: Trouble declaring hardware serial... And Serial3 not declared in this scope
Posted: Sun Oct 18, 2020 3:10 pm
by stevestrong
But now Serial3 is working, isn't it?
Btw, the correct declaration would be:
Code: Select all
HardwareSerial my_serial_name(USART3, BOARD_USART3_TX_PIN, BOARD_USART3_RX_PIN);
see
here and
here.
So your declaration
Code: Select all
HardwareSerial audioSerial(USART3,PB11,PB10);
should work.
Re: Trouble declaring hardware serial... And Serial3 not declared in this scope
Posted: Sun Oct 18, 2020 3:51 pm
by Mangy_Dog
Yeah thats whats been confusing....
HardwareSerial audioSerial(USART3,PB11,PB10);
Doesnt work.
Re: Trouble declaring hardware serial... And Serial3 not declared in this scope
Posted: Sun Oct 18, 2020 7:44 pm
by stevestrong
And what exactly means "doesn't work"?
Re: Trouble declaring hardware serial... And Serial3 not declared in this scope
Posted: Sun Oct 18, 2020 8:08 pm
by Mangy_Dog
USART3 was not declared in this scope. is one error it gets
Re: Trouble declaring hardware serial... And Serial3 not declared in this scope
Posted: Sun Oct 18, 2020 8:21 pm
by stevestrong
It looks like some include was missing indeed, I just fixed in Roger's repo, see
https://github.com/rogerclarkmelbourne/ ... f3c60f7674.
Re: Trouble declaring hardware serial... And Serial3 not declared in this scope
Posted: Sun Oct 18, 2020 9:49 pm
by Mangy_Dog
Haha that fixed the hardware serial defining

Thank you
ive still not figured out what actually broke the serial3 in the first place. I redid all the changes to the freshly downloaded rogerscore. And still worked...
Sooo strange.