test
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user