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.

config_pins.h 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef _CONFIG_PINS_H_
  2. #define _CONFIG_PINS_H_
  3. // ----------------------------------------------------------------------------
  4. // ----------------------------------------------------------------------------
  5. #ifdef PLATFORM_AVR
  6. #define BUILTIN_LED_PIN 13
  7. // ----------------------------------------------------------------------------
  8. #ifdef FUNCTION_UI
  9. #define SERIAL_LCD_TX_PIN 10
  10. #define KEYMATRIX_ROWS 4
  11. #define KEYMATRIX_COLS 3
  12. #define KEYMATRIX_ROW_PINS 5, 6, 7, 8
  13. #define KEYMATRIX_COL_PINS 2, 3, 4
  14. #endif // FUNCTION_UI
  15. // ----------------------------------------------------------------------------
  16. #ifdef FUNCTION_CONTROL
  17. // out 1, out 2, out 3, out 4, in
  18. #define VALVE_COUNT 5
  19. #define VALVE_PINS 10, 11, 12, 14, 15
  20. // a, b, c
  21. #define PUMP_COUNT 3
  22. #define PUMP_PINS 16, 17, 18
  23. // bottom, top
  24. #define SWITCH_COUNT 2
  25. #define SWITCH_PINS 19, 20
  26. #endif // FUNCTION_CONTROL
  27. #endif // PLATFORM_AVR
  28. // ----------------------------------------------------------------------------
  29. // ----------------------------------------------------------------------------
  30. #ifdef PLATFORM_ESP
  31. #define BUILTIN_LED_PIN 1
  32. // ----------------------------------------------------------------------------
  33. #ifdef FUNCTION_UI
  34. #error configuration not supported
  35. #endif // FUNCTION_UI
  36. // ----------------------------------------------------------------------------
  37. #ifdef FUNCTION_CONTROL
  38. // out 1, out 2, out 3, out 4, in
  39. #define VALVE_COUNT 5
  40. #define VALVE_PINS 27, 14, 5, 18, 15
  41. // a, b, c
  42. #define PUMP_COUNT 3
  43. #define PUMP_PINS 2, 0, 4
  44. // bottom, top
  45. #define SWITCH_COUNT 2
  46. #define SWITCH_PINS 26, 25
  47. #define I2C_SDA_PIN 21
  48. #define I2C_SCL_PIN 22
  49. #endif // FUNCTION_CONTROL
  50. #endif // PLATFORM_ESP
  51. // ----------------------------------------------------------------------------
  52. // ----------------------------------------------------------------------------
  53. #endif // _CONFIG_PINS_H_