HSA_LCD_Shield.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. //////////////////////////////////////////////////////////////////////
  2. // //
  3. // Programmname: HSA_LCD_Shield - Header //
  4. // Datum: 23.04.2018 //
  5. // Beschreibung: Header-Datei für das LCD-Shield, welches im Modul //
  6. // "Elektronikdesign" erstellt wurde. Hier werden //
  7. // alle Funktionen der Klasse "HSA_LCD_Shield" auf- //
  8. // geführt und beschrieben. //
  9. // //
  10. // Autor: Tobias Müller, M. Eng. //
  11. // //
  12. //////////////////////////////////////////////////////////////////////
  13. //////////////////////////////////////////////////////////////////////
  14. ////////// create Header //////////
  15. //////////////////////////////////////////////////////////////////////
  16. #ifndef HSA_LCD_Shield
  17. #define HSA_LCD_Shield
  18. //////////////////////////////////////////////////////////////////////
  19. ////////// Define Symbol //////////
  20. //////////////////////////////////////////////////////////////////////
  21. // I²C Addresse
  22. #ifndef I2C_ADDRESS
  23. #define I2C_ADDRESS 0x3C
  24. #endif
  25. // Button Right
  26. #ifndef BUTTON_RIGHT
  27. #define BUTTON_RIGHT 0x02
  28. #endif
  29. // Button Down
  30. #ifndef BUTTON_DOWN
  31. #define BUTTON_DOWN 0x03
  32. #endif
  33. // Button Up
  34. #ifndef BUTTON_UP
  35. #define BUTTON_UP 0x04
  36. #endif
  37. // Button Left
  38. #ifndef BUTTON_LEFT
  39. #define BUTTON_LEFT 0x05
  40. #endif
  41. // LED Red
  42. #ifndef LED_RED
  43. #define LED_RED 0x06
  44. #endif
  45. // LED Green
  46. #ifndef LED_GREEN
  47. #define LED_GREEN 0x07
  48. #endif
  49. // LCD-Backlight
  50. #ifndef LCD_BACKLIGHT
  51. #define LCD_BACKLIGHT 0x08
  52. #endif
  53. //////////////////////////////////////////////////////////////////////
  54. ////////// Include Header-File //////////
  55. //////////////////////////////////////////////////////////////////////
  56. #include <Arduino.h>
  57. #include <Wire.h>
  58. //////////////////////////////////////////////////////////////////////
  59. ////////// Global Variable //////////
  60. //////////////////////////////////////////////////////////////////////
  61. //////////////////////////////////////////////////////////////////////
  62. ////////// Define Class //////////
  63. //////////////////////////////////////////////////////////////////////
  64. /// @brief HSA_LCD_Shield class
  65. /// @details Is used, to control all functions of the HSA_LCD_Shield
  66. class HSA_LCD_Shield {
  67. //////////////////////////////////////////////////////////////////////
  68. ////////// Privat Area //////////
  69. //////////////////////////////////////////////////////////////////////
  70. private:
  71. Byte _i2cAddress;
  72. Byte _buttonRight;
  73. Byte _buttonDown;
  74. Byte _buttonUp;
  75. Byte _buttonLeft;
  76. Byte _buttonRight;
  77. Byte _ledRed;
  78. Byte _ledGreen;
  79. Byte _lcdBacklight;
  80. //////////////////////////////////////////////////////////////////////
  81. ////////// Public Functions //////////
  82. //////////////////////////////////////////////////////////////////////
  83. public:
  84. ////////// Public Functions //////////
  85. HSA_LCD_Shield
  86. //////////////////////////////////////////////////////////////////////
  87. ////////// close Header //////////
  88. //////////////////////////////////////////////////////////////////////
  89. };
  90. #endif