Guest User

Untitled

a guest
Dec 14th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. Adafruit_MAX31855_Info get_info(void);
  2. ^
  3.  
  4. Adafruit_MAX31855_Info get_info(uint8_t ch);
  5.  
  6. ^
  7.  
  8. #ifndef KTA259V3_H
  9. #define KTA259V3_H
  10.  
  11. #if ARDUINO >= 100
  12. #include <Arduino.h>
  13. #else
  14. #include <wiring.h>
  15. #include "pins_arduino.h"
  16. #endif
  17.  
  18. #include <SPI.h>
  19. #include "Adafruit_MAX31855.h"
  20.  
  21. // Time to wait in milliseconds for signal to settle after switching channels on MUX
  22. #define KTA259V3_MUX_WAIT 250
  23.  
  24. // Pins for ADG608R Multiplexer
  25. #define KTA259V3_PIN_A0 4
  26. #define KTA259V3_PIN_A1 5
  27. #define KTA259V3_PIN_A2 6
  28. #define KTA259V3_PIN_EN 7
  29.  
  30. class KTA259V3 : public Adafruit_MAX31855 {
  31. private:
  32. uint8_t samples;
  33.  
  34. public:
  35. /** Constructor */
  36. KTA259V3(uint8_t pin);
  37.  
  38. /** Set amount of oversampling **/
  39. void set_oversampling(uint16_t samples);
  40.  
  41. /** Select channel on MUX, use numbers 1 to 8 (not 0 to 7).
  42. * PCB is has channels 1 to 8 marked on it. User must wait
  43. * for signal to settle before reading it.
  44. */
  45. void select_channel(uint8_t ch);
  46.  
  47. /** Calls update() on parent class */
  48. void update(void);
  49.  
  50. /** Selects channel, waits KTA259V3_MUX_WAIT, then updates _info */
  51. void update(uint8_t ch);
  52.  
  53. /** Returns _info structure from last update */
  54. Adafruit_MAX31855_Info get_info(void);
  55.  
  56. /** Selects channel and update, then return _info structure */
  57. Adafruit_MAX31855_Info get_info(uint8_t ch);
  58. };
  59.  
  60. #endif
Add Comment
Please, Sign In to add comment