-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (22 loc) · 854 Bytes
/
main.cpp
File metadata and controls
30 lines (22 loc) · 854 Bytes
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
#include <Arduino.h>
#include "mcp23017.h"
//Ignore the compiler instruction related code (the ones that start with #) if you are not attempting the optional section
//Uncomment the statement below this line to work on the optional section
// #define EXTERNAL_RESET_ENABLED
#ifdef EXTERNAL_RESET_ENABLED
#define RESET_PIN ______ //TODO: Add the pin thats doing the reset
#endif
// TODO: declare mcp23017 object
void setup() {
// initialize Serial for printouts
Serial.begin(115200);
printf("Test begins\n");
#ifdef EXTERNAL_RESET_ENABLED
//TODO: Configure the digital pin acting as a reset an output pin and reset the IOExpander registers to their default values.
//Make sure to check if it is an Active-High or Active-Low reset
#endif
// TODO: initialize I2C and mcp23017 object
}
void loop() {
// TODO: Write tests here
}