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

Too much info on serial #5

Open
AlexLPD opened this issue Mar 9, 2018 · 1 comment
Open

Too much info on serial #5

AlexLPD opened this issue Mar 9, 2018 · 1 comment

Comments

@AlexLPD
Copy link

AlexLPD commented Mar 9, 2018

Hi, and fist to all, thanks for the amazing lib, it makes a lot easier to read this sensors.

Never the least, I was using a simple Display temperature and I have a lot of information on serial, can this be disable?

This is my code;
`#include "thermistor.h"
#define NTC_PIN A1

// Thermistor object
THERMISTOR thermistor(NTC_PIN, // Analog pin
10000, // Nominal resistance at 25 ºC
3950, // thermistor's beta coefficient
9470); // Value of the series resistor

// Global temperature reading
float temp = 0;

void setup()
{
Serial.begin(9600);
Serial.println("PORGRAMA NUEVO");
}

void loop()
{
temp = thermistor.read(); // Read temperature

Serial.print("Temp = "); Serial.println(temp);

delay(500);
}`

And this is the serial output;

Average analog reading 495.00
Thermistor resistance 10101.33
Temperature 24.77 *C
Temp = 247.00
Average analog reading 495.20
Thermistor resistance 10093.43
Temperature 24.79 *C
Temp = 247.00
Average analog reading 495.40
Thermistor resistance 10085.53
Temperature 24.81 *C
Temp = 248.00
Average analog reading 495.00
Thermistor resistance 10101.33
Temperature 24.77 *C
Temp = 247.00
Average analog reading 495.00
Thermistor resistance 10101.33
Temperature 24.77 *C
Temp = 247.00

When I was expecting only to be;
Temperature 24.77 *C

It will be possible? I will look in to it, and if I manage to make a "disable enable versose" will come back to it.

Thanks.

-Alex.

@AlexLPD
Copy link
Author

AlexLPD commented Mar 9, 2018

I went to edit the file, comment on the verbose serial output, and pretty much remove any usufullnes of the lib, I think the best way is to send a float value as the resul of the reading, pretty much usefull, another thing migth want to re think is the 10ms delay, not pretty much, but is something.

Thanks a lot.

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

1 participant