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.h 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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_H_
  20. #define _CONFIG_H_
  21. //#define DEBUG_WAIT_FOR_SERIAL_CONN
  22. #define DEBUG_ENABLE_LCD_OUTPUT_ON_SERIAL
  23. #define DEBUG_ENABLE_KEYPAD_INPUT_ON_SERIAL
  24. // in milliseconds
  25. #define DISPLAY_BACKLIGHT_TIMEOUT (5UL * 60UL * 1000UL)
  26. #define BACK_TO_IDLE_TIMEOUT (5UL * 60UL * 1000UL)
  27. // in seconds
  28. #define MAX_TANK_FILL_TIME (80)
  29. #define AUTO_STIRR_RUNTIME 60
  30. #define MAX_AUTO_PLANT_RUNTIME (35 * 60)
  31. #define MAX_PUMP_RUNTIME 30
  32. #define MAX_VALVE_RUNTIME (45 * 60)
  33. #define MAX_AUX_RUNTIME (5 * 60)
  34. #define KICKSTART_RUNTIME 60
  35. #define OVERRUN_RUNTIME 75
  36. #define PURGE_FILL_RUNTIME 20
  37. #define FULLAUTO_MIN_PLANT_COUNT 2
  38. #define FULLAUTO_END_PUMP_TIME 30
  39. // Sketch version
  40. #define FIRMWARE_VERSION "0.7"
  41. // all given in milliseconds
  42. #define SERVER_HANDLE_INTERVAL 0
  43. #define WEBSOCKET_UPDATE_INTERVAL 500
  44. #define LED_BLINK_INTERVAL 500
  45. #define LED_INIT_BLINK_INTERVAL 500
  46. #define LED_CONNECT_BLINK_INTERVAL 250
  47. #define LED_ERROR_BLINK_INTERVAL 100
  48. #define TELEGRAM_UPDATE_INTERVAL (2 * 1000)
  49. #define MQTT_RECONNECT_INTERVAL (5 * 1000)
  50. // each attempt takes LED_CONNECT_BLINK_INTERVAL ms
  51. #define MAX_WIFI_CONNECT_ATTEMPTS 40
  52. #define INVERT_SENSOR_BOTTOM
  53. //#define INVERT_SENSOR_TOP
  54. #define CHECK_SENSORS_VALVE_PUMP_MENU_FULL // be careful when uncommenting this!
  55. //#define CHECK_SENSORS_VALVE_PUMP_MENU_EMPTY
  56. #define OWN_I2C_ADDRESS 0x42
  57. #define I2C_BUS_SPEED 400000
  58. #define I2C_BUF_SIZE 32
  59. //#define ENABLE_GPIO_TEST
  60. #define GPIO_TEST_INTERVAL 4000
  61. #define GPIO_TEST_DELAY 200
  62. // InfluxDB settings
  63. #define ENABLE_INFLUXDB_LOGGING
  64. #define INFLUXDB_HOST "10.23.42.14"
  65. #define INFLUXDB_PORT 8086
  66. #define INFLUXDB_DATABASE "giessomat"
  67. #define DOOR_LOCK_PIN 4223
  68. #define DOOR_LOCK_PIN_MAX_DIGITS 6
  69. #define DOOR_LOCK_ON_TIME 200 /* in ms */
  70. #define DOOR_LOCK_NEXT_DELAY 100 /* in ms */
  71. #endif // _CONFIG_H_