DIY fertilizer mixer and plant watering machine https://www.xythobuz.de/giessomat.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SerialLCD.h 837B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _SERIAL_LCD_H_
  2. #define _SERIAL_LCD_H_
  3. #ifdef FUNCTION_UI
  4. #if defined(PLATFORM_AVR)
  5. #include <SendOnlySoftwareSerial.h>
  6. #elif defined(PLATFORM_ESP)
  7. #include <SoftwareSerial.h>
  8. #else
  9. #error platform not supported
  10. #endif
  11. class SerialLCD {
  12. public:
  13. SerialLCD(int tx_pin);
  14. ~SerialLCD(void);
  15. void init(void);
  16. void clear(void);
  17. void setBacklight(uint8_t val);
  18. // 0 no cursor, 1 underline, 2 blinking, 3 both
  19. void cursor(int style);
  20. void position(int line, int col);
  21. void write(const char *text);
  22. void write(int line, const char *text);
  23. void write(int line, int col, const char *text);
  24. private:
  25. #if defined(PLATFORM_AVR)
  26. SendOnlySoftwareSerial *lcd;
  27. #elif defined(PLATFORM_ESP)
  28. SoftwareSerial *lcd;
  29. #endif
  30. };
  31. #endif // FUNCTION_UI
  32. #endif // _SERIAL_LCD_H_