-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdaq.ino
More file actions
70 lines (47 loc) · 1.48 KB
/
Copy pathdaq.ino
File metadata and controls
70 lines (47 loc) · 1.48 KB
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
// telemetry process
// gps process
// can process
// sd card process
// therm process: MCP96RL00
// adc process: ADS8688IDBTR
// imu process: ASM330LHHXTR
void setup() {
// put your setup code here, to run once:
// CAN RX and TX Pinouts
constexpr uint8_t TEENSY_RX_PIN = 23;
constexpr uint8_t TEENSY_TX_PIN = 22;
// i2c pins
constexpr uint8_t SCL_IMU_PIN = 24;
constexpr uint8_t SDA_IMU_PIN = 25;
constexpr uint8_t INT_INU_PIN = 5;
constexpr uint8_t SCL_THERM_PIN = 19;
constexpr uint8_t SDA_THERM_PIN = 18;
// GPS pins
constexpr uint8_t GPS_TX_PIN = 35;
constexpr uint8_t GPS_RX_PIN = 34;
// digital pins
constexpr uint8_t DIG1_PIN = 29;
constexpr uint8_t DIG2_PIN = 30;
constexpr uint8_t DIG3_PIN = 31;
constexpr uint8_t DIG4_PIN = 32;
// TELEM pins
constexpr uint8_t TELEM_RX_PIN = 7;
constexpr uint8_t TELEM_TX_PIN = 8;
// ADC SPI pins
constexpr uint8_t ADC_SCLK_PIN 13;
constexpr uint8_t ADC_SDI_PIN 11; // MOSI
constexpr uint8_t ADC_SDO_PIN = 12; // MISO
constexpr uint8_t CS_PIN = 10;
constexpr uint8_t RST_PIN = 1;
// serial writing
serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
// collect adc data from pinouts
// process thermistor data
// process can data from pinouts
// process gps data
// telemetry process
// write to sd card
}