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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. #define SENSOR_DISTANCE 70.0 /* in mm */
  14. #define BB_WEIGHT 0.25 /* in g */
  15. #define BB_WEIGHTS { 0.20, 0.23, 0.25, 0.28, 0.475 } /* in g */
  16. // --------------------------------------
  17. // which unit to show on history screen
  18. #define METRIC 0
  19. #define IMPERIAL 1
  20. #define JOULES 2
  21. #define PREFERRED_UNITS METRIC
  22. // --------------------------------------
  23. // order and duration of screens
  24. #define SCREEN_CURRENT 0
  25. #define SCREEN_MIN 1
  26. #define SCREEN_AVERAGE 2
  27. #define SCREEN_MAX 3
  28. #define SCREEN_HISTORY 4
  29. #define SCREEN_ROTATION { \
  30. SCREEN_CURRENT, \
  31. SCREEN_CURRENT, \
  32. SCREEN_MIN, \
  33. SCREEN_AVERAGE, \
  34. SCREEN_MAX, \
  35. SCREEN_HISTORY, \
  36. SCREEN_HISTORY \
  37. }
  38. #define SCREEN_TIMEOUT 2500 /* in ms */
  39. #define FLIP_SCREEN 0
  40. // --------------------------------------
  41. // lcd config
  42. #define LCD_TYPE U8G2_SSD1306_128X64_NONAME_F_HW_I2C
  43. #define HEADING_FONT u8g2_font_VCR_OSD_tr
  44. #define TEXT_FONT u8g2_font_NokiaLargeBold_tr
  45. #define SMALL_FONT u8g2_font_helvB08_tr
  46. // --------------------------------------
  47. // history for graph of speeds.
  48. // should not be too big!
  49. #define HISTORY_BUFFER 50
  50. // --------------------------------------
  51. #define IR_LED_PIN 4
  52. #define UV_LED_PIN 5
  53. // --------------------------------------
  54. // allowed values: 1, 8, 64, 256, 1024
  55. #define TIMER_PRESCALER 64
  56. // --------------------------------------
  57. // placeholder data for debugging purposes
  58. #define DEBUG_TICK_COUNT 0
  59. #define DEBUG_TICK_DATA {}
  60. //#define DEBUG_TICK_COUNT 8
  61. //#define DEBUG_TICK_DATA { 8000, 10000, 9000, 11000, 8500, 9500, 10000, 7000 }
  62. // --------------------------------------
  63. #endif // __CONFIG_H__