добавлены комментарии по выбору пинов для разных плат. Для стартовых примеров добавлен ifdef для автоматического задания корректных выводов
This commit is contained in:
1 parent
f45757f13c
commit
53511ffbe2
33 files changed
+280
-169
No files matched your search
@@ -17,17 +17,22 @@
|
||||
* Second serial device's TX attached to digital pin 8(RX), RX to pin 10(TX)
|
||||
|
||||
Note:
|
||||
Not all pins on the Elbear Ace-Uno support interrupts,
|
||||
so only the following can be used for RX:
|
||||
2, 3, 4, 5, 8, 9
|
||||
Not all pins on the Elbear Ace-Uno/Ace-Nano support interrupts,
|
||||
so only the following can be used for RX: 2, 3, 4, 5, 8, 9
|
||||
Elsomik board pins with interrupts: P0_8, P1_4, P1_5, P1_6, P1_9, P1_10, P1_15, P2_7
|
||||
Start board pins with interrupts: P0_10, P0_12, P0_13, P0_14, P0_15, P1_9, P1_15
|
||||
*/
|
||||
|
||||
#include <SoftwareSerial.h>
|
||||
|
||||
// software serial #1: RX = digital pin 2, TX = digital pin 6
|
||||
SoftwareSerial portOne(2, 6);
|
||||
int rx_pin_1 = 2; // P1_9 for Start/Elsomik
|
||||
int tx_pin_1 = 6; // P0_2 for Start/Elsomik
|
||||
SoftwareSerial portOne(rx_pin_1, tx_pin_1);
|
||||
// software serial #2: RX = digital pin 8, TX = digital pin 10
|
||||
SoftwareSerial portTwo(8, 10);
|
||||
int rx_pin_2 = 8; // P1_15 for Start/Elsomik
|
||||
int tx_pin_2 = 10; // P1_3 for Start/Elsomik
|
||||
SoftwareSerial portTwo(rx_pin_2, tx_pin_2);
|
||||
|
||||
// active port is changed by user button pressing
|
||||
volatile bool isPortOneActive = true;
|
||||
|
||||
Reference in new issue
Block a user