v0.5.3
- начальный загрузчик для плат elbear, elsomik обновлен до версии 0.2.0 - исключено появление краткосрочных просадок при работе ШИМ с максимальным коэффициентом заполнения - добавлена возможность пропускать код стандартного обработчика прерываний при использовании пользовательского обработчика - добавлена возможность конфигурирования вывода на вход с притяжкой к земле (INPUT_PULLDOWN) - исправление известных ошибок
This commit was merged in pull request #29.
This commit is contained in:
1 parent
8a675b2f61
commit
0fbfd77518
42 files changed
+1007
-762
No files matched your search
@@ -5,13 +5,14 @@
|
||||
Receives from software serial, sends to hardware serial.
|
||||
|
||||
The circuit:
|
||||
* RX is digital pin 2 (connect to TX of other device)
|
||||
* TX is digital pin 6 (connect to RX of other device)
|
||||
* RX is digital pin 2 (P0_10) (connect to TX of other device)
|
||||
* TX is digital pin 6 (P0_2) (connect to RX of other device)
|
||||
|
||||
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
|
||||
|
||||
created back in the mists of time
|
||||
modified 25 May 2012
|
||||
@@ -22,8 +23,9 @@
|
||||
|
||||
*/
|
||||
#include <SoftwareSerial.h>
|
||||
|
||||
SoftwareSerial mySerial(2, 6); // RX, TX
|
||||
int rx_pin = 2; // P1_9 for Start/Elsomik
|
||||
int tx_pin = 6; // P0_2 for Start/Elsomik
|
||||
SoftwareSerial mySerial(rx_pin, tx_pin);
|
||||
|
||||
void setup() {
|
||||
// Open serial communications and wait for port to open:
|
||||
|
||||
@@ -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