Skip to content

Add analog read/write like feature for direct pin support #291

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

Closed
luc-github opened this issue Jan 18, 2019 · 3 comments
Closed

Add analog read/write like feature for direct pin support #291

luc-github opened this issue Jan 18, 2019 · 3 comments

Comments

@luc-github
Copy link
Owner

luc-github commented Jan 18, 2019

Analog write is not available in ESP32 but instead of use a external lib I plan to use the ledcWrite function
For esp8266 - I need to check

@luc-github
Copy link
Owner Author

requested here : #286

@luc-github luc-github changed the title Add analog write like feature for direct pin support Add analog read/write like feature for direct pin support Feb 17, 2019
@luc-github
Copy link
Owner Author

luc-github commented Feb 17, 2019

done : 99b892c
new parameters :
ANALOG=NO ANALOG_RANGE=255 CLEARCHANNELS=NO
so by default if ANALOG=YES is not set, it is digital to keep backware compatibility
Default range is 255 which means 8 bits resolution, can be 1024 (10 bits) or other proper value, this value must be set at each call or default value is used
Default frequency use 1Mhz as I was not sure it would be useful to add a parameter for it
CLEARCHANNELS=YES is only for ESP32 to reset pin/channel assignment

For ESP8266 as only 1 ADC, any pin number will work for Analog reading, for ESP32 there are up to 16 pins because 16 channels
I did not tested heavily as I am travelling but feel free to feedback

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant