3D printed Arduino Airsoft Chronograph
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 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * config.h
  3. *
  4. * OpenChrono BB speed measurement device.
  5. *
  6. * Copyright (c) 2022 Thomas Buck <thomas@xythobuz.de>
  7. */
  8. #ifndef __CONFIG_H__
  9. #define __CONFIG_H__
  10. // --------------------------------------
  11. #define VERSION "0.0.1"
  12. // --------------------------------------
  13. // hardware details
  14. #define SENSOR_DISTANCE 70.0 /* in mm */
  15. #define BB_WEIGHT 0.25 /* in g */
  16. #define BB_WEIGHTS { 0.20, 0.23, 0.25, 0.28, 0.475 } /* in g */
  17. // --------------------------------------
  18. // which unit to show on history screen
  19. #define METRIC 0
  20. #define IMPERIAL 1
  21. #define JOULES 2
  22. #define PREFERRED_UNITS METRIC
  23. // --------------------------------------
  24. // order and duration of screens
  25. #define SCREEN_CURRENT 0
  26. #define SCREEN_MIN 1
  27. #define SCREEN_AVERAGE 2
  28. #define SCREEN_MAX 3
  29. #define SCREEN_HISTORY 4
  30. #define SCREEN_ROTATION { \
  31. SCREEN_CURRENT, \
  32. SCREEN_CURRENT, \
  33. SCREEN_MIN, \
  34. SCREEN_AVERAGE, \
  35. SCREEN_MAX, \
  36. SCREEN_HISTORY, \
  37. SCREEN_HISTORY \
  38. }
  39. #define SCREEN_TIMEOUT 2500 /* in ms */
  40. #define FLIP_SCREEN 0
  41. // --------------------------------------
  42. // lcd config
  43. #define LCD_TYPE U8G2_SSD1306_128X64_NONAME_F_HW_I2C
  44. #define HEADING_FONT u8g2_font_VCR_OSD_tr
  45. #define TEXT_FONT u8g2_font_NokiaLargeBold_tr
  46. #define SMALL_FONT u8g2_font_helvB08_tr
  47. // --------------------------------------
  48. // history for graph of speeds.
  49. // should not be too big!
  50. #define HISTORY_BUFFER 50
  51. // --------------------------------------
  52. #define IR_LED_PIN 4
  53. // --------------------------------------
  54. // placeholder data for debugging purposes
  55. #define DEBUG_TICK_COUNT 0
  56. #define DEBUG_TICK_DATA {}
  57. //#define DEBUG_TICK_COUNT 8
  58. //#define DEBUG_TICK_DATA { 8000, 10000, 9000, 11000, 8500, 9500, 10000, 7000 }
  59. // --------------------------------------
  60. #endif // __CONFIG_H__