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

ANALOG_SUPPORT breaks GPIO0 use #1777

Closed
lblabr opened this issue Jun 16, 2019 · 4 comments
Closed

ANALOG_SUPPORT breaks GPIO0 use #1777

lblabr opened this issue Jun 16, 2019 · 4 comments

Comments

@lblabr
Copy link
Contributor

lblabr commented Jun 16, 2019

i'm using Arduino IDE to compile espurna firmware, using 1.13.6-dev.
Board Wemos mini / compatible to Wemos mini.

Enabling Analog_Support will break relay functions. Where do i have to start to figure out what happens ?

#elif defined(BEREGNUNG)

// Info
#define MANUFACTURER        "WEMOS"
#define DEVICE              "BEREGNUNG"

// Disable non-core modules
#define ALEXA_SUPPORT           0
#define BROKER_SUPPORT          0
#define BUTTON_SUPPORT          0
#define DOMOTICZ_SUPPORT        0
#define HOMEASSISTANT_SUPPORT   0
#define I2C_SUPPORT             0
#define MDNS_SERVER_SUPPORT     0
#define MQTT_SUPPORT            1
#define NTP_SUPPORT             1
#define SCHEDULER_SUPPORT       1
#define THINGSPEAK_SUPPORT      0
#define WEB_SUPPORT             1

// Extra light-weight image
#define DEBUG_SERIAL_SUPPORT    0
#define DEBUG_TELNET_SUPPORT    0
#define DEBUG_WEB_SUPPORT       1
#define LED_SUPPORT             0
#define TELNET_SUPPORT          0
#define TERMINAL_SUPPORT        1	

// #define SENSOR_SUPPORT 1
#define ANALOG_SUPPORT 1

#define RELAY1_PIN          2
#define RELAY1_TYPE         RELAY_TYPE_INVERSE
#define RELAY2_PIN          0
#define RELAY2_TYPE         RELAY_TYPE_INVERSE
#define RELAY3_PIN          4
#define RELAY3_TYPE         RELAY_TYPE_INVERSE
#define RELAY4_PIN          5
#define RELAY4_TYPE         RELAY_TYPE_NORMAL

// #define I2C_SDA_PIN 12 // D2
// #define I2C_SCL_PIN 14 // D1

#endif

@mcspr
Copy link
Collaborator

mcspr commented Jun 23, 2019

Note that I don't use ANALOG_SUPPORT, just an observation based on code.


As you can see, it hard-codes pin 0 as INPUT. While relays would want to write to it.
TBH, based on documentation, I don't quite understand how analogRead works on GPIO0 instead of ADC pin

@stale
Copy link

stale bot commented Aug 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 22, 2019
@mcspr
Copy link
Collaborator

mcspr commented Aug 22, 2019

Fixed the comment above in the c15d87a, closing.

@mcspr mcspr closed this as completed Aug 22, 2019
@mcspr mcspr added this to the 1.13.6 milestone Aug 22, 2019
@mcspr mcspr changed the title ANALOG_SUPPORT breaks relays ANALOG_SUPPORT breaks GPIO0 use Aug 22, 2019
@lblabr
Copy link
Contributor Author

lblabr commented Oct 26, 2019

with dev works like a charme, thanks!!

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

No branches or pull requests

2 participants