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 928B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. void saveSplash(void);
  19. void enableSplash(void);
  20. void disableSplash(void);
  21. // 0 no cursor, 1 underline, 2 blinking, 3 both
  22. void cursor(int style);
  23. void position(int line, int col);
  24. void write(const char *text);
  25. void write(int line, const char *text);
  26. void write(int line, int col, const char *text);
  27. private:
  28. #if defined(PLATFORM_AVR)
  29. SendOnlySoftwareSerial *lcd;
  30. #elif defined(PLATFORM_ESP)
  31. SoftwareSerial *lcd;
  32. #endif
  33. };
  34. #endif // FUNCTION_UI
  35. #endif // _SERIAL_LCD_H_