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 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * Copyright (c) 2021 Thomas Buck <thomas@xythobuz.de>
  3. *
  4. * This file is part of Giess-o-mat.
  5. *
  6. * Giess-o-mat is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Giess-o-mat is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Giess-o-mat. If not, see <https://www.gnu.org/licenses/>.
  18. */
  19. #ifndef _CONFIG_PINS_H_
  20. #define _CONFIG_PINS_H_
  21. // ----------------------------------------------------------------------------
  22. // ----------------------------------------------------------------------------
  23. #ifdef PLATFORM_AVR
  24. #define BUILTIN_LED_PIN 13
  25. // ----------------------------------------------------------------------------
  26. #ifdef FUNCTION_UI
  27. #define SERIAL_LCD_TX_PIN 10
  28. #define KEYMATRIX_ROWS 4
  29. #define KEYMATRIX_COLS 3
  30. #define KEYMATRIX_ROW_PINS 5, 6, 7, 8
  31. #define KEYMATRIX_COL_PINS 2, 3, 4
  32. #endif // FUNCTION_UI
  33. // ----------------------------------------------------------------------------
  34. #ifdef FUNCTION_CONTROL
  35. // out 1, out 2, out 3, out 4, in
  36. #define VALVE_COUNT 5
  37. #define VALVE_PINS 10, 11, 12, 14, 15
  38. // a, b, c
  39. #define PUMP_COUNT 3
  40. #define PUMP_PINS 16, 17, 18
  41. // bottom, top
  42. #define SWITCH_COUNT 2
  43. #define SWITCH_PINS 19, 20
  44. // stirrer
  45. #define AUX_COUNT 1
  46. #define AUX_PINS 21
  47. #endif // FUNCTION_CONTROL
  48. #endif // PLATFORM_AVR
  49. // ----------------------------------------------------------------------------
  50. // ----------------------------------------------------------------------------
  51. #ifdef PLATFORM_ESP
  52. #define BUILTIN_LED_PIN 1
  53. // ----------------------------------------------------------------------------
  54. #ifdef FUNCTION_UI
  55. #error configuration not supported
  56. #endif // FUNCTION_UI
  57. // ----------------------------------------------------------------------------
  58. #ifdef FUNCTION_CONTROL
  59. // out 1, out 2, out 3, out 4, in
  60. #define VALVE_COUNT 5
  61. #define VALVE_PINS 27, 14, 5, 18, 15
  62. // a, b, c
  63. #define PUMP_COUNT 3
  64. #define PUMP_PINS 2, 0, 4
  65. // stirrer
  66. #define AUX_COUNT 1
  67. #define AUX_PINS 19
  68. // bottom, top
  69. #define SWITCH_COUNT 2
  70. #define SWITCH_PINS 26, 25
  71. #define I2C_SDA_PIN 21
  72. #define I2C_SCL_PIN 22
  73. #endif // FUNCTION_CONTROL
  74. #endif // PLATFORM_ESP
  75. // ----------------------------------------------------------------------------
  76. // ----------------------------------------------------------------------------
  77. #endif // _CONFIG_PINS_H_