Skip to content

Generic esp8266 does not set i2c pins for ESP01 #8900

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

Open
4 of 6 tasks
keremers opened this issue Mar 30, 2023 · 2 comments
Open
4 of 6 tasks

Generic esp8266 does not set i2c pins for ESP01 #8900

keremers opened this issue Mar 30, 2023 · 2 comments

Comments

@keremers
Copy link

keremers commented Mar 30, 2023

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [ESP-01]
  • Core Version: [3.0.2]
  • Development Env: [Arduino IDE 2.0.4]
  • Operating System: [Windows]

Settings in IDE

  • Module: [Generic ESP8266 Module]
  • Flash Mode: [qio]
  • Flash Size: [1MB]
  • lwip Variant: [v2 Lower Memory]
  • Reset Method: [nodemcu]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [80Mhz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200] (serial upload only)

Problem Description

the library does not set i2c pins for ESP-01 correctly. It comes with default 4 SDA/5 SCK which ESP01 is missing. It should set them GP2 and GP0.

MCVE Sketch

#include <Arduino.h>

void setup() {
.
.
// requires manual initialization
Wire.begin (2,0);
.
.
}

void loop() {

}

Debug Messages

Debug messages go here
@d-a-v
Copy link
Collaborator

d-a-v commented Apr 1, 2023

The default (sda,scl)=(4,5) choice is historical and it is not advised to change them now.
Sadly, there is no esp01 in the available board list.
What can be proposed is to add a new board variant (= a new board esp01 or esp01s or both) with proper documentation.
Would you be keen to make such a proposal ?

Changes would happen there where you can amend the board list displayed in the IDE and allow selecting the matching variant. Its include files would go to variants/esp01/.

@enjoyneering
Copy link

enjoyneering commented Apr 3, 2023

I often use ESP-01 with AHT10 in my projects and they work OK if SDA is on GPIO0 and SCL is on GPIO2.

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

No branches or pull requests

3 participants