add M0 and M1 pin and change serial pins
This commit is contained in:
parent
446757cf88
commit
a2adcf7afd
@ -3,7 +3,7 @@ const float TENSION_SCALE = 15.701;
|
|||||||
const float CURRENT_SCALE = 31.25;
|
const float CURRENT_SCALE = 31.25;
|
||||||
const float ADC_TO_VOLT = 5.0 / 1023.0;
|
const float ADC_TO_VOLT = 5.0 / 1023.0;
|
||||||
|
|
||||||
SoftwareSerial lora(8, 9); // RX, TX
|
SoftwareSerial lora(10, 9); // RX, TX
|
||||||
|
|
||||||
float tens = 0;
|
float tens = 0;
|
||||||
float amp = 0;
|
float amp = 0;
|
||||||
@ -13,6 +13,10 @@ String line = "";
|
|||||||
void setup() {
|
void setup() {
|
||||||
lora.begin(9600);
|
lora.begin(9600);
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
pinMode(11, OUTPUT);
|
||||||
|
pinMode(12, OUTPUT);
|
||||||
|
digitalWrite(11, LOW); // M1
|
||||||
|
digitalWrite(12, LOW); // M0
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include <SoftwareSerial.h>
|
#include <SoftwareSerial.h>
|
||||||
|
|
||||||
SoftwareSerial lora(8, 9); // RX, TX
|
SoftwareSerial lora(10, 9); // RX, TX
|
||||||
|
|
||||||
bool test_with_fake = false;
|
bool test_with_fake = false;
|
||||||
|
|
||||||
@ -9,6 +9,10 @@ String line = "";
|
|||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
lora.begin(9600);
|
lora.begin(9600);
|
||||||
|
pinMode(11, OUTPUT);
|
||||||
|
pinMode(12, OUTPUT);
|
||||||
|
digitalWrite(11, LOW); // M1
|
||||||
|
digitalWrite(12, LOW); // M0
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user