Sorry for the repost, (posted this on the backup forum)
But my current project is using a few serial lines, and im filling up my other IOs...
The serial 1 had an alt set of pins for hardware serial. How do I switch which pins serial 1 uses in rogers core? If I can use these alt pins iw ould save me a right headache.
Selecting alt serial pins? (rogers core)
Selecting alt serial pins? (rogers core)
Just a dogs body developer, mostly making props and stuff...
-
- Posts: 505
- Joined: Fri Dec 27, 2019 4:53 pm
- Location: Munich, Germany
- Contact:
Re: Selecting alt serial pins? (rogers core)
Two options:
1) - change the core file HardwareSerial.cpp lines to adapt the new pins from the board.h
2) - declare your own new HardwareSerial name(USART<?>n, <new_TX_PIN>, <new_RX_PIN>) in your sketch.
In both cases you have to remap the USART pins with afio_remap(<param>), wherein the param is one of these.
1) - change the core file HardwareSerial.cpp lines to adapt the new pins from the board.h
2) - declare your own new HardwareSerial name(USART<?>n, <new_TX_PIN>, <new_RX_PIN>) in your sketch.
In both cases you have to remap the USART pins with afio_remap(<param>), wherein the param is one of these.