Browse code

Setam credentialele mqtt_user si mqtt_devid in momoria nodeMCU Programul se urca pe nodeMCU si apoi se programeaza cu softul util

Andrei Bucur authored on 01/03/2018 13:58:31
Showing 1 changed files
... ...
@@ -6,9 +6,6 @@
6 6
 #include <ESP8266WebServer.h>
7 7
 #include <DNSServer.h>
8 8
 
9
-// Constants
10
-const int TRIGGER_PIN = 0; // D3 on NodeMCU and WeMos.
11
-
12 9
 // Variables
13 10
 const char* set_mqtt_user="exwrgq";
14 11
 const char* set_mqtt_devid="2638";
... ...
@@ -27,9 +24,6 @@ void setup() {
27 27
   Serial.begin(115200);
28 28
   Serial.println("\n Starting");
29 29
 
30
-  // Initialize trigger pins
31
-  pinMode(TRIGGER_PIN, INPUT_PULLUP);
32
-
33 30
   // Mount the filesystem
34 31
   bool result = SPIFFS.begin();
35 32
   //Serial.println("SPIFFS opened: " + result);
... ...
@@ -48,11 +42,8 @@ void setup() {
48 48
 
49 49
 void loop() {
50 50
   // is configuration portal requested?
51
-  if (digitalRead(TRIGGER_PIN) == LOW) {
52
-     Serial.println("Configuration portal requested");
53 51
     writeConfigFile();
54
-     Serial.println("writeconfigfile...done");
55
-  }
52
+    delay(9999999);
56 53
 }
57 54
 
58 55
 bool readConfigFile() {