Incompatible library?

Hi.

Does the library <Pushbutton.h> have compability issues with <LiquidCrystal.h> and #include <LiquidCrystal.h> ?

If i create a project only with <Pushbutton.h> everything works fine, but when i incorporate the code in my real project it not works. What i want is increase and decrease a value with single debounced press. That value will then be used to turn on the led and buzzer that right now is set by a fixed value. In the code attatched is the // Setpoint alarm

Could anyone help? Thanks in advance

#include <math.h>
#include <LiquidCrystal.h>
#include <Pushbutton.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);


int ThermistorPin = 0;
int buzzer = 7;
int led = 13;
int Vo;
float R1 = 10000;
float logR2, R2, T, Tc;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;

Pushbutton button1 = 9;
Pushbutton button2 = 10;

int count = -20;

float minT = 999;
float maxT = -999;







void setup()
{
  lcd.begin(16, 2);
  pinMode(led, OUTPUT);
  pinMode(buzzer, OUTPUT);
  tone(buzzer, 2000, 1000);
  delay(1000);
}




void loop()
{

 //Temperature Calculation
  Vo = analogRead(ThermistorPin);
  R2 = R1 * (1023.0 / (float)Vo - 1.0);
  logR2 = log(R2);
  T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
  Tc = T - 273.15;



  // determine min & max
    if (Tc < minT)
    {
    minT = Tc;
    maxT = Tc;
    }
  if (Tc > maxT)
    maxT = Tc;



// Setpoint alarm  
  
    if (button1.getSingleDebouncedPress()){
      count = count + 1; //increase the counter once the button is released
    }
    if (button2.getSingleDebouncedPress()){
      count = count - 1; //increase the counter once the button is released
    }


  
    
  
//LCD Line 1
  lcd.setCursor(0, 0);
  lcd.print("T ");
  lcd.print(Tc, 2);
  lcd.print((char)223);

 lcd.setCursor(9, 0);
  lcd.print("A ");
  lcd.print(count);

  
  
//LCD Line 2

lcd.setCursor(0, 1);
  lcd.print("L ");
  lcd.print(minT, 1);

  
lcd.setCursor(9, 1);
  lcd.print("H ");
  lcd.print(maxT, 1);
  

 // Turn on LED
  if (Tc >= 22) digitalWrite(led, HIGH);
  if (Tc < 22) digitalWrite(led, LOW);


// Turn on buzzer
  if (Tc >= 25) tone(buzzer, 2500);
  if (Tc < 25) noTone(buzzer);


delay(2000);
}

Please provide a detailed explanation of what you mean by "it not works".

when i pressed the buttons to increase ou decrease, the value do not change (is always -20).

replace
int ThermistorPin = 0;
by another pin.
Use 0 and 1 only for Serial Input/Output.
Add debug/serial.prints to your code.
To be precise: add debug/serial.prints to your if statements

if (button1.getSingleDebouncedPress()){

to see if you button gets recognized.

Serial outputs are your most important helpers to see what your code is really doing!(!!!)

noiasca:
replace

int ThermistorPin = 0;

by another pin.
Use 0 and 1 only for Serial Input/Output.

ThermistorPin is only used in an analogRead - nothing wrong with that.

I have a analog thermoresistor to get temperature readings connected to A0 and is working fine. The problem is not there.

I tested again the pushbuttons and i'm getting readings.

anyone have an idea of what to do?

Did you add the suggested debug prints?

What did they tell you?