1

Topic: Device ESP8266

Question for RemoteXY developers.
It would be possible to configure a devie ESP8266, in which they have the GPIOS from 01 to for example 12.
In this way developments can be made directly from all ESP8266 and its applications such as SonOff and others.
Thank you very much and very good application - RemoteXY

What you don't know ... Question !! and what you know ... Share !! - By Joan

2

Re: Device ESP8266

In my particular case I have no problem, I use the NodeMCU device and WIFI on the chip, then I modify the code on the Arduino and it works for me.
But I admit that for other people, it is difficult for them to make modifications to the code in the Arduino IDE.
Know that Remote XY is very easy to control.

What you don't know ... Question !! and what you know ... Share !! - By Joan

3

Re: Device ESP8266

It would be really great if Joan briefly described, how the code that is intended for the NodeMCU, can be adapted so that it works for an ESP8266.

Thank you in advance for that.

4

Re: Device ESP8266

Hello and thanks for asking.
Adapting the NodeMCU code to ESP8266 does not present any problem, it is easy ...
In the case of two buttons, the pins on the NodeMCU would be D0 and D2. On the ESP8266-01, they correspond to GPIO0 and GPIO2, which is the same as 0 and 2.
In other ESPs, it would be the same, change the Dxx pins, for the corresponding pin.
But you do this in the sketch once you have it in the Arduino IDE and before compiling.
If you need anything else, tell me.

RemoteXY - NodeMCU V3
/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_SWITCH_1 D0
#define PIN_SWITCH_2 D2

--------

On IDE Arduino - ESP8266-01
/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_SWITCH_1 0
#define PIN_SWITCH_2 2

What you don't know ... Question !! and what you know ... Share !! - By Joan

5

Re: Device ESP8266

It is easy to translate code for a Wemos device, or any other device, that uses the Dx method to denote an IO pin, D1, D2 etc.  There are tables on the net that relate all the Dx type pin ID's to the more normal GPIO number.  The table below shows the two forms of pin ID.

Pin    Function                    ESP-8266 Pin
TX    TXD                        TXD
RX    RXD                        RXD
A0    Analog input, 0 to 1 volt              A0
D0    IO                        GPIO16
D1    IO, SCL                    GPIO5
D2    IO, SDA                    GPIO4
D3    IO, 10k Pull-up                GPIO0
D4    IO, 10k Pull-up, BUILTIN_LED    GPIO2
D5    IO, SCK                    GPIO14
D6    IO, MISO                    GPIO12
D7    IO, MOSI                    GPIO13
D8    IO, 10k Pull-down, SS        GPIO15
G    Ground                    GND
5V    Supply pin                    5V
3V3    3.3V                        3.3V
RST    Reset                    RST