Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

3 månader sedan
123456789101112131415161718192021222324252627
  1. #ifndef LCD_H
  2. #define LCD_H
  3. #include <Arduino.h>
  4. #include <LiquidCrystal_I2C.h>
  5. class LCD {
  6. private:
  7. LiquidCrystal_I2C* lcd = nullptr; // set the LCD address to 0x27 for a 16 chars and 2 line display
  8. const int columns = 18;
  9. const int rows = 2;
  10. public:
  11. LCD();
  12. ~LCD();
  13. void init();
  14. void print_init_message(int calibration_weight) const;
  15. void print_calibration(int calib_weight) const;
  16. void print_weight(double weight, int precision, const char* unit) const;
  17. void print_weights(double grams, double grains) const;
  18. void print_control_result(String name, double val_min, double val_max, int result);
  19. void clear_row(int row) const;
  20. void clear() const;
  21. };
  22. #endif