so no luck with the onscreen LED's, I was not able to get anything on the screen after a couple of hours.
So I tried text instead, surprisingly I was able to actually get something on the screen.
I have a limit switch connected to pins D7 and ground.
on booting up the nodeMCU I get "open" state, which is great, then I press the limit switch to simulate the gate being in the closed position, on the screen i get "closed" state, perfect!
but that is it, it wont change anymore, on releasing the switch it should go back to "open" state
i tried D6 too same results.
code:
/*
-- gatekeeper --
This source code of graphical user interface
has been generated automatically by RemoteXY editor.
To compile this code using RemoteXY library 3.1.10 or later version
download by link http://remotexy.com/en/library/
To connect using RemoteXY mobile app by link http://remotexy.com/en/download/
- for ANDROID 4.13.1 or later version;
- for iOS 1.10.1 or later version;
This source code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
*/
//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////
// you can enable debug logging to Serial at 115200
//#define REMOTEXY__DEBUGLOG
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP8266WIFI_LIB_POINT
#include <ESP8266WiFi.h>
// RemoteXY connection settings
#define REMOTEXY_WIFI_SSID "iot"
#define REMOTEXY_WIFI_PASSWORD "sh6d0wh6t"
#define REMOTEXY_SERVER_PORT 6377
#include <RemoteXY.h>
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] = // 41 bytes
{ 255,1,0,11,0,34,0,17,0,0,0,230,1,126,200,1,1,2,0,1,
51,37,24,24,9,8,31,103,97,116,101,0,67,42,91,40,10,5,93,24,
11 };
// this structure defines all the variables and events of your control interface
struct {
// input variables
uint8_t button_01; // =1 if button pressed, else =0
// output variables
char text_01[11]; // string UTF8 end zero
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
#define PIN_BUTTON_01 D5
void setup()
{
RemoteXY_Init ();
pinMode (PIN_BUTTON_01, OUTPUT);
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
digitalWrite(PIN_BUTTON_01, (RemoteXY.button_01==0)?LOW:HIGH);
if (digitalRead(D7)==HIGH) strcpy (RemoteXY.text_01, "open");
else strcpy (RemoteXY.text_01, "closed");
// TODO you loop code
// use the RemoteXY structure for data transfer
// do not call delay(), use instead RemoteXY_delay()
}