Merge branch 'master' of 192.168.1.250:/home/git/AHome into master

This commit is contained in:
2020-09-29 18:40:16 +03:00
2 changed files with 7 additions and 5 deletions

View File

@@ -12,4 +12,4 @@
platform = espressif8266
board = esp12e
framework = arduino
board_build.ldscript = eagle.flash.2m.ld
;board_build.ldscript = eagle.flash.2m.ld

View File

@@ -41,7 +41,7 @@ WiFiEventHandler wifiConnectHandler;
WiFiEventHandler wifiDisconnectHandler;
Ticker wifiReconnectTimer;
SoftwareSerial softSer;
SoftwareSerial softSer(D7, D8);
void connectToWifi();
void connectToMqtt();
@@ -57,7 +57,9 @@ void writeHex(std::string data);
void setup(){
Serial.begin(9600);
softSer.begin(9600, SWSERIAL_8N1, D5, D6, false);
pinMode(D7, INPUT);
pinMode(D8, OUTPUT);
softSer.begin(9600);//, SWSERIAL_8N1, D5, D6, false);
WiFi.mode(WIFI_STA);
WiFi.hostname("Cur-MidRoom");
@@ -118,7 +120,7 @@ void loop(){
while(softSer.available()){
in_b = softSer.read();
Serial.print(in_b, 16);
readByte(in_b);
//readByte(in_b);
}
if(cRun + 999 < millis()){
cRun = millis();
@@ -137,7 +139,7 @@ void connectToWifi() {
void connectToMqtt() {
Serial.println("Connecting to MQTT...");
mqttClient.connect();
//mqttClient.connect();
}
void onWifiConnect(const WiFiEventStationModeGotIP& event) {