Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Spirulerie.h 1.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef SPIRULERIE_H
  2. #define SPIRULERIE_H
  3. #include <Arduino.h>
  4. #include <DallasTemperature.h>
  5. // ---------- ZONE EDITION UTILISATEUR -----
  6. // version number is visible on the backside of the Spirulerie motherboard
  7. // le numéro de version est visible sur la face arrière de la carte Spirulerie
  8. // comment every version number except yours
  9. //#define SPIRULERIE_104 // Spirulerie v1.4 2020
  10. #define SPIRULERIE_105 // Spirulerie v1.5 (or 1.51) 2020
  11. //#define SPIRULERIE_106 // Spirulerie v1.6 2021 ?
  12. // parametres du PWM
  13. #define PWM_FREQ 40000 // 40 khz
  14. #define PWM_RESOLUTION_BITS 10
  15. #define PWM_MAX_RESOLUTION 1023
  16. // ---------- ZONE NON EDITION -------------
  17. // PIN DEFINITIONS
  18. #define PIN_LCDLIGHT 17
  19. #define PIN_DS18B20 4
  20. #define PIN_DACBUZZER 25
  21. #define PORT_A 12
  22. #define PORT_B 26
  23. #define PORT_D 27
  24. #ifdef SPIRULERIE_104
  25. #define PIN_BTN_LEFT 35
  26. #define PIN_BTN_MIDDLE 33
  27. #define PIN_BTN_RIGHT 32
  28. #define PORT_C 14
  29. #endif
  30. #ifdef SPIRULERIE_105
  31. #define PIN_BTN_LEFT 35
  32. #define PIN_BTN_MIDDLE 36
  33. #define PIN_BTN_RIGHT 39
  34. #define PORT_C 16
  35. #endif
  36. // PWM Channels
  37. #define PWMC_DAC 0
  38. #define PWMC_A 1
  39. #define PWMC_B 2
  40. #define PWMC_C 3
  41. #define PWMC_D 4
  42. // ---------- Fonctions --------------------
  43. void SpirulerieInit();
  44. void digitalPWMWrite(uint8_t channel, uint16_t duty);
  45. #endif