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

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