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

Add voltmeter function #432

Closed
jougfr61 opened this issue Apr 6, 2020 · 9 comments
Closed

Add voltmeter function #432

jougfr61 opened this issue Apr 6, 2020 · 9 comments

Comments

@jougfr61
Copy link

jougfr61 commented Apr 6, 2020

I add some resistors between the power supply and the analog pin (ESP8266) and I can read the ADC value by direct command.
Now I would like:

  • to convert the digital value (0-255) on analog value : it can be done by a multiplicator value define on config.h (for example ANALOG_CONV 1 by default, or in my case, 0.588)
  • to disp the value on web-UI: add a option to disp this parameter (like DHT sensor) and the Unit (this function can be use for differents analog sensors)
@github-actions
Copy link

github-actions bot commented Apr 6, 2020

Thank your for submiting, please be sure you followed template or your issue may be dismissed.

@luc-github
Copy link
Owner

need also to do some polling to get the value? what would be the frequency of this polling?

@jougfr61
Copy link
Author

jougfr61 commented Apr 6, 2020

The frequency can be define on the printer menu, like DHT sensor. In my case, each 10 or 30s are enought

@stale
Copy link

stale bot commented Apr 27, 2020

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

@stale
Copy link

stale bot commented Apr 27, 2020

This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

1 similar comment
@stale
Copy link

stale bot commented Apr 27, 2020

This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@luc-github
Copy link
Owner

I will work on this next week - it should be part of new generic sensor implementation

@luc-github
Copy link
Owner

it is now implemented just need to updated webUI to display it
in configuration.h I have added the convertion function for flexibility

//SENSOR_DEVICE: send info based on defined sensor
//DHT11_DEVICE    1
//DHT22_DEVICE    2
//ANALOG_DEVICE   3
//BMP280_DEVICE   4
//BME280_DEVICE   5
#define SENSOR_DEVICE ANALOG_DEVICE

...

#ifdef SENSOR_DEVICE
//pin
#define ESP3D_SENSOR_PIN 22
//Conversion coefficient
#define SENSOR_CONVERTER(v) v*0.588
//Unit to use, if not applicaple for sensor will use default one
//it is used also for the output format
//C for Celsius / F for Fahrenheit / V for volt
#define SENSOR__UNIT "C"
#endif //SENSOR_DEVICE

@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

2 participants