2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
PinMapping.h
Go to the documentation of this file.
1
4
25
26#pragma once
27
28#include <Arduino.h>
29
30#include "MiscConstants.h"
31
32namespace OCInputs {
33 constexpr uint8_t button_left_top_in = A0;
34 constexpr uint8_t button_left_top_gnd = A1;
35 constexpr size_t button_left_top_idx = 0;
36
37 constexpr uint8_t button_left_middle_in = 42;
38 constexpr uint8_t button_left_middle_gnd = 43;
39 constexpr size_t button_left_middle_idx = 1;
40
41 constexpr uint8_t button_left_bottom_in = A2;
42 constexpr uint8_t button_left_bottom_gnd = A3;
43 constexpr size_t button_left_bottom_idx = 2;
44
45 constexpr uint8_t button_middle_top_in = 38;
46 constexpr uint8_t button_middle_top_gnd = 39;
47 constexpr size_t button_middle_top_idx = 3;
48
49 constexpr uint8_t button_middle_middle_in = 40;
50 constexpr uint8_t button_middle_middle_gnd = 41;
51 constexpr size_t button_middle_middle_idx = 4;
52
53 constexpr uint8_t button_middle_bottom_in = 21;
54 constexpr uint8_t button_middle_bottom_gnd = 22;
55 constexpr size_t button_middle_bottom_idx = 5;
56
57 constexpr uint8_t button_right_top_in = 16;
58 constexpr uint8_t button_right_top_gnd = 13;
59 constexpr size_t button_right_top_idx = 6;
60
61 constexpr uint8_t button_right_middle_in = 50;
62 constexpr uint8_t button_right_middle_gnd = 51;
63 constexpr size_t button_right_middle_idx = 7;
64
65 constexpr uint8_t button_right_bottom_in = 52;
66 constexpr uint8_t button_right_bottom_gnd = 53;
67 constexpr size_t button_right_bottom_idx = 8;
68
69 constexpr uint8_t button_high_in = 19;
70 constexpr uint8_t button_high_gnd = 20;
71 constexpr size_t button_high_idx = 9;
72
73 constexpr uint8_t button_middle_in = A8;
74 constexpr uint8_t button_middle_gnd = A9;
75 constexpr size_t button_middle_idx = 10;
76
77 constexpr uint8_t button_low_in = 17;
78 constexpr uint8_t button_low_gnd = 18;
79 constexpr size_t button_low_idx = 11;
80
81 constexpr uint8_t button_stow_in = 36;
82 constexpr uint8_t button_stow_gnd = 37;
83 constexpr size_t button_stow_idx = 12;
84
85 constexpr uint8_t switch_led_in = 46;
86 constexpr uint8_t switch_led_gnd = 47;
87 constexpr size_t switch_led_idx = 13;
88
89 constexpr uint8_t switch_gamep_in = 44;
90 constexpr uint8_t switch_gamep_gnd = 45;
91 constexpr size_t switch_gamep_idx = 14;
92
93 constexpr uint8_t switch_bash_in = A6;
94 constexpr uint8_t switch_bash_gnd = A7;
95 constexpr size_t switch_bash_idx = 15;
96
97 constexpr uint8_t switch_spare_in = A4;
98 constexpr uint8_t switch_spare_gnd = A5;
99 constexpr size_t switch_spare_idx = 16;
100
101 constexpr uint8_t switch_boxboi_in = 49;
102 constexpr uint8_t switch_boxboi_gnd = 48;
103 constexpr size_t switch_boxboi_idx = 17;
104} // namespace OCInputs
105
106namespace OCOutputs {
107
108 constexpr uint8_t led_button_left_top_out = 26;
110 constexpr size_t led_button_left_top_idx = 0;
111 constexpr bool led_button_left_top_pwm = false;
112
113 constexpr uint8_t led_button_left_middle_out = 11;
115 constexpr size_t led_button_left_middle_idx = 1;
116 constexpr bool led_button_left_middle_pwm = true;
117
118 constexpr uint8_t led_button_left_bottom_out = 27;
120 constexpr size_t led_button_left_bottom_idx = 2;
121 constexpr bool led_button_left_bottom_pwm = false;
122
123 constexpr uint8_t led_button_middle_top_out = 9;
125 constexpr size_t led_button_middle_top_idx = 3;
126 constexpr bool led_button_middle_top_pwm = true;
127
128 constexpr uint8_t led_button_middle_middle_out = 10;
130 constexpr size_t led_button_middle_middle_idx = 4;
131 constexpr bool led_button_middle_middle_pwm = true;
132
133 constexpr uint8_t led_button_middle_bottom_out = 7;
135 constexpr size_t led_button_middle_bottom_idx = 5;
136 constexpr bool led_button_middle_bottom_pwm = true;
137
138 constexpr uint8_t led_button_right_top_out = 4;
140 constexpr size_t led_button_right_top_idx = 6;
141 constexpr bool led_button_right_top_pwm = true;
142
143 constexpr uint8_t led_button_right_middle_out = 24;
145 constexpr size_t led_button_right_middle_idx = 7;
146 constexpr bool led_button_right_middle_pwm = false;
147
148 constexpr uint8_t led_button_right_bottom_out = 25;
150 constexpr size_t led_button_right_bottom_idx = 8;
151 constexpr bool led_button_right_bottom_pwm = false;
152
153 constexpr uint8_t led_button_high_out = 6;
154 constexpr uint8_t led_button_high_gnd = NOT_A_PIN;
155 constexpr size_t led_button_high_idx = 9;
156 constexpr bool led_button_high_pwm = true;
157
158 constexpr uint8_t led_button_middle_out = 3;
159 constexpr uint8_t led_button_middle_gnd = NOT_A_PIN;
160 constexpr size_t led_button_middle_idx = 10;
161 constexpr bool led_button_middle_pwm = true;
162
163 constexpr uint8_t led_button_low_out = 5;
164 constexpr uint8_t led_button_low_gnd = NOT_A_PIN;
165 constexpr size_t led_button_low_idx = 11;
166 constexpr bool led_button_low_pwm = true;
167
168 constexpr uint8_t led_button_stow_out = 8;
169 constexpr uint8_t led_button_stow_gnd = NOT_A_PIN;
170 constexpr size_t led_button_stow_idx = 12;
171 constexpr bool led_button_stow_pwm = true;
172
173 constexpr uint8_t led_switch_led_out = 12;
174 constexpr uint8_t led_switch_led_gnd = NOT_A_PIN;
175 constexpr size_t led_switch_led_idx = 13;
176 constexpr bool led_switch_led_pwm = true;
177
178 constexpr uint8_t led_switch_gamep_on_out = 1;
180 constexpr size_t led_switch_gamep_on_idx = 14;
181 constexpr bool led_switch_gamep_on_pwm = false;
182
183 constexpr uint8_t led_switch_gamep_off_out = 14;
185 constexpr size_t led_switch_gamep_off_idx = 15;
186 constexpr bool led_switch_gamep_off_pwm = false;
187
188 constexpr uint8_t led_switch_bash_on_out = 30;
190 constexpr size_t led_switch_bash_on_idx = 16;
191 constexpr bool led_switch_bash_on_pwm = false;
192
193 constexpr uint8_t led_switch_bash_off_out = 31;
195 constexpr size_t led_switch_bash_off_idx = 17;
196 constexpr bool led_switch_bash_off_pwm = false;
197
198 constexpr uint8_t led_switch_spare_on_out = 28;
200 constexpr size_t led_switch_spare_on_idx = 18;
201 constexpr bool led_switch_spare_on_pwm = false;
202
203 constexpr uint8_t led_switch_spare_off_out = 29;
205 constexpr size_t led_switch_spare_off_idx = 19;
206 constexpr bool led_switch_spare_off_pwm = false;
207
208 constexpr uint8_t led_switch_boxboi_on_out = 3;
210 constexpr size_t led_switch_boxboi_on_idx = 20;
211 constexpr bool led_switch_boxboi_on_pwm = true;
212
213 constexpr uint8_t led_switch_boxboi_off_out = 14;
215 constexpr size_t led_switch_boxboi_off_idx = 21;
216 constexpr bool led_switch_boxboi_off_pwm = false;
217
218} // namespace OCOutputs
219
220namespace GPButtons {
221 constexpr uint8_t numButtons = 18;
222
223 constexpr uint8_t gpButton_left_top_idx = 0;
224 constexpr uint8_t gpButton_left_middle_idx = 1;
225 constexpr uint8_t gpButton_left_bottom_idx = 2;
226 constexpr uint8_t gpButton_middle_top_idx = 3;
227 constexpr uint8_t gpButton_middle_middle_idx = 4;
228 constexpr uint8_t gpButton_middle_bottom_idx = 5;
229 constexpr uint8_t gpButton_right_top_idx = 6;
230 constexpr uint8_t gpButton_right_middle_idx = 7;
231 constexpr uint8_t gpButton_right_bottom_idx = 8;
232 constexpr uint8_t gpButton_stow_idx = 9;
233 constexpr uint8_t gpButton_high_idx = 10;
234 constexpr uint8_t gpButton_middle_idx = 11;
235 constexpr uint8_t gpButton_low_idx = 12;
236 constexpr uint8_t gpButton_led_idx = 13;
237 constexpr uint8_t gpButton_gamep_idx = 14;
238 constexpr uint8_t gpButton_bash_idx = 15;
239 constexpr uint8_t gpButton_spareswitch_idx = 16;
240 constexpr uint8_t gpButton_boxboi_idx = 17;
241} // namespace GPButtons
Miscellaneous constants for the operator controller.
constexpr uint8_t NOT_A_PIN
Definition MiscConstants.h:30
Definition PinMapping.h:220
constexpr uint8_t gpButton_spareswitch_idx
Definition PinMapping.h:239
constexpr uint8_t gpButton_led_idx
Definition PinMapping.h:236
constexpr uint8_t gpButton_right_top_idx
Definition PinMapping.h:229
constexpr uint8_t gpButton_middle_top_idx
Definition PinMapping.h:226
constexpr uint8_t gpButton_stow_idx
Definition PinMapping.h:232
constexpr uint8_t gpButton_right_middle_idx
Definition PinMapping.h:230
constexpr uint8_t gpButton_left_bottom_idx
Definition PinMapping.h:225
constexpr uint8_t gpButton_middle_bottom_idx
Definition PinMapping.h:228
constexpr uint8_t gpButton_gamep_idx
Definition PinMapping.h:237
constexpr uint8_t gpButton_bash_idx
Definition PinMapping.h:238
constexpr uint8_t gpButton_high_idx
Definition PinMapping.h:233
constexpr uint8_t gpButton_right_bottom_idx
Definition PinMapping.h:231
constexpr uint8_t gpButton_boxboi_idx
Definition PinMapping.h:240
constexpr uint8_t gpButton_middle_idx
Definition PinMapping.h:234
constexpr uint8_t gpButton_left_top_idx
Definition PinMapping.h:223
constexpr uint8_t gpButton_left_middle_idx
Definition PinMapping.h:224
constexpr uint8_t gpButton_low_idx
Definition PinMapping.h:235
constexpr uint8_t numButtons
Definition PinMapping.h:221
constexpr uint8_t gpButton_middle_middle_idx
Definition PinMapping.h:227
Definition PinMapping.h:32
constexpr size_t button_right_bottom_idx
Definition PinMapping.h:67
constexpr uint8_t button_right_bottom_gnd
Definition PinMapping.h:66
constexpr uint8_t switch_gamep_gnd
Definition PinMapping.h:90
constexpr uint8_t switch_led_in
Definition PinMapping.h:85
constexpr uint8_t button_left_top_in
Definition PinMapping.h:33
constexpr uint8_t button_right_top_in
Definition PinMapping.h:57
constexpr uint8_t button_left_middle_in
Definition PinMapping.h:37
constexpr size_t button_low_idx
Definition PinMapping.h:79
constexpr size_t button_middle_top_idx
Definition PinMapping.h:47
constexpr size_t button_right_top_idx
Definition PinMapping.h:59
constexpr uint8_t button_high_in
Definition PinMapping.h:69
constexpr size_t button_middle_bottom_idx
Definition PinMapping.h:55
constexpr uint8_t button_right_bottom_in
Definition PinMapping.h:65
constexpr uint8_t button_right_middle_gnd
Definition PinMapping.h:62
constexpr size_t button_left_bottom_idx
Definition PinMapping.h:43
constexpr uint8_t switch_spare_gnd
Definition PinMapping.h:98
constexpr size_t button_middle_idx
Definition PinMapping.h:75
constexpr uint8_t button_middle_bottom_in
Definition PinMapping.h:53
constexpr uint8_t switch_gamep_in
Definition PinMapping.h:89
constexpr uint8_t switch_bash_in
Definition PinMapping.h:93
constexpr uint8_t button_right_top_gnd
Definition PinMapping.h:58
constexpr size_t switch_boxboi_idx
Definition PinMapping.h:103
constexpr uint8_t button_middle_in
Definition PinMapping.h:73
constexpr uint8_t button_left_bottom_gnd
Definition PinMapping.h:42
constexpr uint8_t button_stow_gnd
Definition PinMapping.h:82
constexpr uint8_t button_middle_top_gnd
Definition PinMapping.h:46
constexpr uint8_t button_right_middle_in
Definition PinMapping.h:61
constexpr uint8_t button_left_top_gnd
Definition PinMapping.h:34
constexpr uint8_t button_middle_bottom_gnd
Definition PinMapping.h:54
constexpr uint8_t button_low_gnd
Definition PinMapping.h:78
constexpr uint8_t switch_bash_gnd
Definition PinMapping.h:94
constexpr size_t button_right_middle_idx
Definition PinMapping.h:63
constexpr size_t button_middle_middle_idx
Definition PinMapping.h:51
constexpr size_t switch_spare_idx
Definition PinMapping.h:99
constexpr size_t switch_gamep_idx
Definition PinMapping.h:91
constexpr size_t button_left_middle_idx
Definition PinMapping.h:39
constexpr size_t button_stow_idx
Definition PinMapping.h:83
constexpr uint8_t button_high_gnd
Definition PinMapping.h:70
constexpr uint8_t switch_spare_in
Definition PinMapping.h:97
constexpr size_t button_high_idx
Definition PinMapping.h:71
constexpr uint8_t button_left_middle_gnd
Definition PinMapping.h:38
constexpr uint8_t button_middle_middle_in
Definition PinMapping.h:49
constexpr uint8_t button_stow_in
Definition PinMapping.h:81
constexpr size_t switch_bash_idx
Definition PinMapping.h:95
constexpr uint8_t button_left_bottom_in
Definition PinMapping.h:41
constexpr size_t button_left_top_idx
Definition PinMapping.h:35
constexpr uint8_t switch_boxboi_gnd
Definition PinMapping.h:102
constexpr uint8_t button_middle_top_in
Definition PinMapping.h:45
constexpr uint8_t switch_boxboi_in
Definition PinMapping.h:101
constexpr uint8_t button_middle_gnd
Definition PinMapping.h:74
constexpr size_t switch_led_idx
Definition PinMapping.h:87
constexpr uint8_t button_low_in
Definition PinMapping.h:77
constexpr uint8_t switch_led_gnd
Definition PinMapping.h:86
constexpr uint8_t button_middle_middle_gnd
Definition PinMapping.h:50
Definition PinMapping.h:106
constexpr uint8_t led_button_middle_bottom_out
Definition PinMapping.h:133
constexpr size_t led_button_left_top_idx
Definition PinMapping.h:110
constexpr uint8_t led_switch_spare_off_out
Definition PinMapping.h:203
constexpr size_t led_button_low_idx
Definition PinMapping.h:165
constexpr uint8_t led_switch_spare_off_gnd
Definition PinMapping.h:204
constexpr bool led_button_middle_bottom_pwm
Definition PinMapping.h:136
constexpr uint8_t led_switch_gamep_on_out
Definition PinMapping.h:178
constexpr uint8_t led_switch_spare_on_gnd
Definition PinMapping.h:199
constexpr uint8_t led_switch_bash_off_gnd
Definition PinMapping.h:194
constexpr uint8_t led_switch_gamep_on_gnd
Definition PinMapping.h:179
constexpr bool led_button_right_bottom_pwm
Definition PinMapping.h:151
constexpr uint8_t led_switch_bash_on_out
Definition PinMapping.h:188
constexpr size_t led_button_middle_bottom_idx
Definition PinMapping.h:135
constexpr size_t led_switch_boxboi_on_idx
Definition PinMapping.h:210
constexpr size_t led_switch_bash_off_idx
Definition PinMapping.h:195
constexpr bool led_button_right_top_pwm
Definition PinMapping.h:141
constexpr bool led_button_middle_middle_pwm
Definition PinMapping.h:131
constexpr uint8_t led_button_right_top_gnd
Definition PinMapping.h:139
constexpr size_t led_button_right_top_idx
Definition PinMapping.h:140
constexpr uint8_t led_button_left_middle_out
Definition PinMapping.h:113
constexpr uint8_t led_switch_gamep_off_out
Definition PinMapping.h:183
constexpr uint8_t led_switch_boxboi_on_out
Definition PinMapping.h:208
constexpr bool led_button_low_pwm
Definition PinMapping.h:166
constexpr bool led_button_stow_pwm
Definition PinMapping.h:171
constexpr bool led_button_middle_pwm
Definition PinMapping.h:161
constexpr uint8_t led_button_right_bottom_out
Definition PinMapping.h:148
constexpr uint8_t led_switch_boxboi_on_gnd
Definition PinMapping.h:209
constexpr size_t led_switch_gamep_on_idx
Definition PinMapping.h:180
constexpr bool led_button_high_pwm
Definition PinMapping.h:156
constexpr size_t led_switch_bash_on_idx
Definition PinMapping.h:190
constexpr uint8_t led_button_high_out
Definition PinMapping.h:153
constexpr size_t led_switch_boxboi_off_idx
Definition PinMapping.h:215
constexpr uint8_t led_button_low_gnd
Definition PinMapping.h:164
constexpr bool led_switch_boxboi_on_pwm
Definition PinMapping.h:211
constexpr uint8_t led_button_left_bottom_gnd
Definition PinMapping.h:119
constexpr uint8_t led_button_high_gnd
Definition PinMapping.h:154
constexpr uint8_t led_button_right_middle_out
Definition PinMapping.h:143
constexpr uint8_t led_button_middle_bottom_gnd
Definition PinMapping.h:134
constexpr bool led_switch_spare_on_pwm
Definition PinMapping.h:201
constexpr uint8_t led_button_middle_top_gnd
Definition PinMapping.h:124
constexpr uint8_t led_button_middle_out
Definition PinMapping.h:158
constexpr bool led_switch_bash_off_pwm
Definition PinMapping.h:196
constexpr bool led_button_left_middle_pwm
Definition PinMapping.h:116
constexpr uint8_t led_button_middle_gnd
Definition PinMapping.h:159
constexpr uint8_t led_button_left_top_gnd
Definition PinMapping.h:109
constexpr uint8_t led_button_right_middle_gnd
Definition PinMapping.h:144
constexpr uint8_t led_switch_gamep_off_gnd
Definition PinMapping.h:184
constexpr bool led_button_middle_top_pwm
Definition PinMapping.h:126
constexpr size_t led_button_high_idx
Definition PinMapping.h:155
constexpr uint8_t led_switch_spare_on_out
Definition PinMapping.h:198
constexpr uint8_t led_button_left_bottom_out
Definition PinMapping.h:118
constexpr size_t led_button_middle_middle_idx
Definition PinMapping.h:130
constexpr bool led_button_left_top_pwm
Definition PinMapping.h:111
constexpr uint8_t led_switch_bash_off_out
Definition PinMapping.h:193
constexpr size_t led_button_right_bottom_idx
Definition PinMapping.h:150
constexpr uint8_t led_switch_led_gnd
Definition PinMapping.h:174
constexpr bool led_switch_gamep_on_pwm
Definition PinMapping.h:181
constexpr size_t led_button_middle_top_idx
Definition PinMapping.h:125
constexpr uint8_t led_switch_boxboi_off_gnd
Definition PinMapping.h:214
constexpr size_t led_switch_gamep_off_idx
Definition PinMapping.h:185
constexpr size_t led_switch_spare_on_idx
Definition PinMapping.h:200
constexpr uint8_t led_button_left_middle_gnd
Definition PinMapping.h:114
constexpr size_t led_switch_led_idx
Definition PinMapping.h:175
constexpr size_t led_button_middle_idx
Definition PinMapping.h:160
constexpr bool led_button_right_middle_pwm
Definition PinMapping.h:146
constexpr uint8_t led_switch_boxboi_off_out
Definition PinMapping.h:213
constexpr bool led_button_left_bottom_pwm
Definition PinMapping.h:121
constexpr uint8_t led_button_middle_middle_gnd
Definition PinMapping.h:129
constexpr size_t led_button_left_middle_idx
Definition PinMapping.h:115
constexpr uint8_t led_button_middle_top_out
Definition PinMapping.h:123
constexpr bool led_switch_spare_off_pwm
Definition PinMapping.h:206
constexpr bool led_switch_boxboi_off_pwm
Definition PinMapping.h:216
constexpr uint8_t led_button_right_top_out
Definition PinMapping.h:138
constexpr size_t led_button_stow_idx
Definition PinMapping.h:170
constexpr size_t led_button_right_middle_idx
Definition PinMapping.h:145
constexpr size_t led_switch_spare_off_idx
Definition PinMapping.h:205
constexpr size_t led_button_left_bottom_idx
Definition PinMapping.h:120
constexpr bool led_switch_bash_on_pwm
Definition PinMapping.h:191
constexpr bool led_switch_gamep_off_pwm
Definition PinMapping.h:186
constexpr uint8_t led_switch_led_out
Definition PinMapping.h:173
constexpr uint8_t led_button_middle_middle_out
Definition PinMapping.h:128
constexpr bool led_switch_led_pwm
Definition PinMapping.h:176
constexpr uint8_t led_button_right_bottom_gnd
Definition PinMapping.h:149
constexpr uint8_t led_button_low_out
Definition PinMapping.h:163
constexpr uint8_t led_button_left_top_out
Definition PinMapping.h:108
constexpr uint8_t led_button_stow_gnd
Definition PinMapping.h:169
constexpr uint8_t led_switch_bash_on_gnd
Definition PinMapping.h:189
constexpr uint8_t led_button_stow_out
Definition PinMapping.h:168