(simple) Enhancement for GPIOs in WebUI

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

(simple) Enhancement for GPIOs in WebUI

#1 Post by moelski » 03 Oct 2016, 08:20

Hi devs,

most of the time I use a NodeMCU board and sometimes a ESP-12F D1 Mini. These boards are not labled with GPIO numbers - they use the digital Pin number.
And when you open the dropdown box in ESPEasy you get GPIO. :? So I alsways have some pinout maps in my Onenote for comparison. Not that funny ...

Looking in the sources there is a point where the dropdown box is populated : void addPinSelect(...)
With some little changes the information is much more usable (I think ;) ):

Code: Select all

void addPinSelect(boolean forI2C, String& str, String name,  int choice)
{
  String options[14];
  options[0] = F(" ");
  options[1] = F("GPIO-0 (D3 - Pullup)");
  options[2] = F("GPIO-1 (D10)");
  options[3] = F("GPIO-2 (D4 - Pullup)");
  options[4] = F("GPIO-3 (D9)");
  options[5] = F("GPIO-4 (D2 - I2C SDA)");
  options[6] = F("GPIO-5 (D1 - I2C SCL)");
  options[7] = F("GPIO-9 (D11 - Flash HOLD)");
  options[8] = F("GPIO-10 (D12 - Flash WP)");
  options[9] = F("GPIO-12 (D6 - SPI MISO)");
  options[10] = F("GPIO-13 (D7 - SPI MOSI)");
  options[11] = F("GPIO-14 (D5 - SPI SCK)");
  options[12] = F("GPIO-15 (D8 - SPI CS)");
  options[13] = F("GPIO-16 (D0)");
See the attached picture for the result.

I put also some default usages in the text (SPI, I2C, Flash, ....).
Using this dropdown box is much much easier on boards like the NodeMCU.

And hey it´s only a little bit of extra text 8-) So maybe you can add it to the master of espeasy?
Attachments
GPIO-Digital.jpg
GPIO-Digital.jpg (26.41 KiB) Viewed 8458 times
regards
Dominik

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: (simple) Enhancement for GPIOs in WebUI

#2 Post by tozett » 03 Oct 2016, 14:01

cool.
+1,

i use the wemos D1 mini (like some others do.)
http://escapequotes.net/wp-content/uplo ... fixled.jpg

there were some post, where errors occured only by another different pin-numbering through wemos.
it integrated, ESPeasy could again a little be easier.. :lol:

anarro
Normal user
Posts: 14
Joined: 01 Aug 2016, 08:32

Re: (simple) Enhancement for GPIOs in WebUI

#3 Post by anarro » 03 Oct 2016, 16:45

Hi,

very cool +1

marcfon
Normal user
Posts: 11
Joined: 17 Sep 2016, 10:50

Re: (simple) Enhancement for GPIOs in WebUI

#4 Post by marcfon » 03 Oct 2016, 17:19

Very useful! Would save time and errors :)

Martinus

Re: (simple) Enhancement for GPIOs in WebUI

#5 Post by Martinus » 03 Oct 2016, 18:15

I think having the (Dx) names will help.
But adding default function names likely raises more questions than answers.
It now looks like GPIO-16 is the only free pin to use for generic things like controlling a relay.

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: (simple) Enhancement for GPIOs in WebUI

#6 Post by moelski » 03 Oct 2016, 18:22

Hi martinus,

I´ve created a pull request for this "Feature".
Having the digital pin number would be a first step 8-)
regards
Dominik

User avatar
nonflammable
Normal user
Posts: 42
Joined: 09 Mar 2016, 22:19
Location: Poland

Re: (simple) Enhancement for GPIOs in WebUI

#7 Post by nonflammable » 07 Oct 2016, 01:21


User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: (simple) Enhancement for GPIOs in WebUI

#8 Post by moelski » 07 Oct 2016, 06:34

great. 8-)

+1
regards
Dominik

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: (simple) Enhancement for GPIOs in WebUI

#9 Post by papperone » 07 Oct 2016, 14:57

+1 ! :D
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests