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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. #endif // FUNCTION_CONTROL
  45. #endif // PLATFORM_AVR
  46. // ----------------------------------------------------------------------------
  47. // ----------------------------------------------------------------------------
  48. #ifdef PLATFORM_ESP
  49. #define BUILTIN_LED_PIN 1
  50. // ----------------------------------------------------------------------------
  51. #ifdef FUNCTION_UI
  52. #error configuration not supported
  53. #endif // FUNCTION_UI
  54. // ----------------------------------------------------------------------------
  55. #ifdef FUNCTION_CONTROL
  56. // out 1, out 2, out 3, out 4, in
  57. #define VALVE_COUNT 5
  58. #define VALVE_PINS 27, 14, 5, 18, 15
  59. // a, b, c
  60. #define PUMP_COUNT 3
  61. #define PUMP_PINS 2, 0, 4
  62. // bottom, top
  63. #define SWITCH_COUNT 2
  64. #define SWITCH_PINS 26, 25
  65. #define I2C_SDA_PIN 21
  66. #define I2C_SCL_PIN 22
  67. #endif // FUNCTION_CONTROL
  68. #endif // PLATFORM_ESP
  69. // ----------------------------------------------------------------------------
  70. // ----------------------------------------------------------------------------
  71. #endif // _CONFIG_PINS_H_