want to all 4 gpio off while restart esp (wifisocket firmware

emiliakowalski
Posts: 74
Joined: Mon Jul 03, 2017 2:50 pm

Tue Aug 29, 2017 11:26 am

nodemcu
emiliakowalski
Posts: 74
Joined: Mon Jul 03, 2017 2:50 pm

Wed Aug 30, 2017 11:18 am

nodemcu please help also esp12
User avatar
pzygmunt
Posts: 3861
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Wed Aug 30, 2017 12:49 pm

Which ports did you use ?
emiliakowalski
Posts: 74
Joined: Mon Jul 03, 2017 2:50 pm

Thu Aug 31, 2017 10:59 am

looks like code is not working :( :(
User avatar
pzygmunt
Posts: 3861
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Thu Aug 31, 2017 11:42 am

Try this code
supla_esp_gpio_hi(B_RELAY1_PORT, 0);
supla_esp_gpio_hi(B_RELAY2_PORT, 0);
supla_esp_gpio_hi(B_RELAY3_PORT, 0);
supla_esp_gpio_hi(B_RELAY4_PORT, 0);

add here:
https://github.com/SUPLA/supla-espressi ... io.c#L1038


but replace B_RELAY*_PORT with your port numbers
emiliakowalski
Posts: 74
Joined: Mon Jul 03, 2017 2:50 pm

Thu Sep 07, 2017 11:17 am

how to replace this "but replace B_RELAY*_PORT with your port numbers"

suppose port number are these:

#define B_RELAY1_PORT 12
#define B_RELAY2_PORT 13
#define B_RELAY3_PORT 14
#define B_RELAY4_PORT 16

<<<<<<<<<<<<<<<<<<<<<so modified code>>>>>>>>>>>>>>>>>>>

supla_esp_gpio_hi(B_RELAY1_PORT, 0);
supla_esp_gpio_hi(B_RELAY2_PORT, 0);
supla_esp_gpio_hi(B_RELAY3_PORT, 0);
supla_esp_gpio_hi(B_RELAY4_PORT, 0);

or

<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>

supla_esp_gpio_hi(B_RELAY12_PORT, 0);
supla_esp_gpio_hi(B_RELAY13_PORT, 0);
supla_esp_gpio_hi(B_RELAY14_PORT, 0);
supla_esp_gpio_hi(B_RELAY16_PORT, 0);

or

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

supla_esp_gpio_hi(B_RELAY1_12, 0);
supla_esp_gpio_hi(B_RELAY2_13, 0);
supla_esp_gpio_hi(B_RELAY3_14, 0);
supla_esp_gpio_hi(B_RELAY4_16, 0);

<<<<<<<<<<<<<<<<<<<<<<<<<<<<

please let me know
User avatar
pzygmunt
Posts: 3861
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Thu Sep 07, 2017 11:38 am

supla_esp_gpio_hi(12, 0);
supla_esp_gpio_hi(13, 0);
supla_esp_gpio_hi(14, 0);
supla_esp_gpio_hi(16, 0);


For GPIO16 use you should add USE_GPIO16_OUTPUT definition to your board.h file

#define USE_GPIO16_OUTPUT
Post Reply