Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow gpio pin assignments to be changed #1

Closed
kd-2020 opened this issue May 28, 2015 · 10 comments
Closed

Allow gpio pin assignments to be changed #1

kd-2020 opened this issue May 28, 2015 · 10 comments

Comments

@kd-2020
Copy link
Contributor

kd-2020 commented May 28, 2015

The readme states that GPIO pins 12 and 13 are needed. I have the ESP-01 breakout version of the esp8266. It doesn't appear to have pins 12 and 13 broken out. Can I still use this module or do I need to purchase a different version?

@vickash
Copy link

vickash commented May 28, 2015

I'm wondering this as well. GPIO 0 and 2 (which ARE broken out on the ESP-01) are both used for status LEDs according to the README. If that's correct, then no, it won't work on the 01.

This project looks like it exactly suits my needs, so I assumed the 01 wouldn't work and ordered an ESP-12 to try with. Still waiting on it, but GPIO 12 and 13 are available there, so it should work.

However, the ESP-01 is more appealing if you're "slaving" the ESP to another microcontroller. It's much smaller in (almost) bread-board-friendly form and you don't really need the extra pins.

I think it would be better to use GPIO 0 and 2 to reset the "master" boards, and use the less-available 12 and 13 for status LEDs. Unless there is some technical issue that prevents this. I have no idea about programming the ESP itself.

@tve
Copy link
Member

tve commented May 28, 2015

The source or binary is not usable with the -01 module as-is. I started with a -01 myself and used gpio0/2 as you guys say. The annoying thing is that the ESP requires these pins to be tied high at boot (and gpio2 low for reflashing). By putting the LEDs on these pins I make double-use of them as pull-ups and I don't end up with side-effects when driving them low to reflash the ESP. It would be relatively straight-forward to change the pins in the code. It's something I want to make easier, but I don't know that I will get to it this week.
I'm using the -03 module 'cause it's nice and small. It's also pretty easy to add normal headers to it with some soldering...
Let me know if you run into issues.

@vickash
Copy link

vickash commented May 28, 2015

Ah. That makes sense. Forgot that those are used to flash the esp itself.
Will check out the 03.
On May 28, 2015 1:25 PM, "Thorsten von Eicken" notifications@github.com
wrote:

The source or binary is not usable with the -01 module as-is. I started
with a -01 myself and used gpio0/2 as you guys say. The annoying thing is
that the ESP requires these pins to be tied high at boot (and gpio2 low for
reflashing). By putting the LEDs on these pins I make double-use of them as
pull-ups and I don't end up with side-effects when driving them low to
reflash the ESP. It would be relatively straight-forward to change the pins
in the code. It's something I want to make easier, but I don't know that I
will get to it this week.
I'm using the -03 module 'cause it's nice and small. It's also pretty easy
to add normal headers to it with some soldering...


Reply to this email directly or view it on GitHub
#1 (comment).

@kd-2020
Copy link
Contributor Author

kd-2020 commented May 28, 2015

I had already ordered a -01, it's still in the mail. Without having it in front of me I don't have a sense of how small it is. Would it be reasonable to solder a couple jumpers wires directly to the esp8266 chip's solder pads and break out gpio 12 and 13 that way? Then just use your code as is? [Edit] Nevermind, a google image search makes that chip look way to tiny for me to tinker with.

BTW, I'm in agreement with vickash, this project looks like exactly what I'm looking for. Thank you tve.

@kd-2020 kd-2020 closed this as completed May 28, 2015
@tve
Copy link
Member

tve commented May 28, 2015

While it is possible to solder to the chip directly, it's really really extremely small. I solder 0603 SMD components regularly and have dealt with 0201 and I wouldn't try this :-). Looks easier to me to change the #defines in the code...

@tve
Copy link
Member

tve commented May 28, 2015

I'm reopening this issue to make it easier to switch pin assignments. This is bound to come up more... The steps are:

  • create global variables to hold gpio pin numbers for reset, isp, conn-led, ser-led
  • create ability to store these settings in flash
  • add drop-down to esp-log web page to change the pin assignments

@tve tve reopened this May 28, 2015
@tve tve changed the title Usage Question About ESP Board Versions Allow gpio pin assignments to be changed May 28, 2015
@kd-2020
Copy link
Contributor Author

kd-2020 commented Jun 2, 2015

I'll be looking forward to this enhancement.

For the time being, to switch the pins all I need to do is edit lines 15-22 in serbridge.c? Or will there be more to it?

@tve
Copy link
Member

tve commented Jun 2, 2015

Also lines 317-318. Beware that there ma still be buffer overrun issues on some web pages. I have not had time to thoroughly test for that.

@tve
Copy link
Member

tve commented Jun 5, 2015

This is addressed in release 0.9.4 using definitions in the Makefile. Still open is to make it more configurable through the web UI and store the settings in flash..

@tve
Copy link
Member

tve commented Jun 19, 2015

gpio pin assignments are configurable on the web pages as of release 0.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants