-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMKRIoTCarrierDefines.h
97 lines (80 loc) · 1.87 KB
/
MKRIoTCarrierDefines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef _CARRIE_DEFINES_
#define _CARRIE_DEFINES_
#include <Wire.h>
#include <SPI.h>
#include <Arduino_PMIC.h> //PMIC
//Sensor libraries
#include <Arduino_APDS9960.h> //Ambient light
#include <Arduino_LPS22HB.h> //Pressure sensor
#include "bsec.h"
#include <Arduino_HTS221.h> // env sensor
#include <Arduino_LSM6DSOX.h>
#include <Arduino_LSM6DS3.h>
#include <Arduino_MKRIoTCarrier_Relay.h> //Relays
#include <Arduino_MKRIoTCarrier_Buzzer.h>//Buzzer
#include <Arduino_MKRIoTCarrier_Qtouch.h>//Buttons
#include <SD.h> //SD card
//Display
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
/* Type for getRevision functions */
using getRev_t = int (*)();
typedef enum {
BOARD_REVISION_1 = 1,
BOARD_REVISION_2 = 2,
} _mkr_io_carrier_board_revision;
enum status {
STATUS_ERROR,
STATUS_OK,
};
namespace mkr_iot_carrier_rev1 {
enum relays {
RELAY1 = 14,
RELAY2 = 13,
};
enum display {
TFT_CS = 2,
TFT_DC = 1,
};
enum touch_pads {
Y0 = 0,
Y1 = 8,
Y2 = 9,
Y3 = 2,
Y4 = 3,
};
enum grove_pins {
GROVE_AN1 = A5,
GROVE_AN2 = A6,
};
};
namespace mkr_iot_carrier_rev2 {
static Bsec *iaqSensor = nullptr;
enum relays {
RELAY1 = 1,
RELAY2 = 2,
};
enum display {
TFT_CS = 13,
TFT_DC = 14,
};
enum touch_pads {
Y0 = 4,
Y1 = 8,
Y2 = 9,
Y3 = 2,
Y4 = 3,
};
enum grove_pins {
GROVE_AN1 = A0,
GROVE_AN2 = A6,
};
};
#define BME_SLAVE_ADDRESS 0x76
#define LSM6DSOX_ADDRESS 0x6A
#define LSM6DS3_ADDRESS 0x6A
#ifdef ARDUINO_SAMD_MKRWIFI1010
#define AREF_PIN 25
#endif
#endif