diff --git a/Template Project/lib/ESPMegaPRO/ESPMegaPRO.h b/Template Project/lib/ESPMegaPRO/ESPMegaPRO.h index 054af53..c699d02 100644 --- a/Template Project/lib/ESPMegaPRO/ESPMegaPRO.h +++ b/Template Project/lib/ESPMegaPRO/ESPMegaPRO.h @@ -6,8 +6,8 @@ #include #include -#define INPUT_BANK_A_ADDRESS 0x20 -#define INPUT_BANK_B_ADDRESS 0x21 +#define INPUT_BANK_A_ADDRESS 0x21 +#define INPUT_BANK_B_ADDRESS 0x20 #define OUTPUT_BANK_ADDRESS 0x21 #define EEPROM_ADDRESS 0x22 diff --git a/Template Project/platformio.ini b/Template Project/platformio.ini index 66bd033..9bb78fe 100644 --- a/Template Project/platformio.ini +++ b/Template Project/platformio.ini @@ -12,5 +12,7 @@ platform = espressif32 board = wt32-eth01 framework = arduino +;siwats/ESPMegaPROR3@1.0.1 lib_deps = adafruit/Adafruit PWM Servo Driver Library@^2.4.1 - robtillaart/PCF8574@^0.3.7 \ No newline at end of file + robtillaart/PCF8574@^0.3.7 +monitor_speed = 115200 \ No newline at end of file diff --git a/Template Project/src/i2c_scanner.cpp.disabled b/Template Project/src/i2c_scanner.cpp.disabled index a22a3a5..74263cc 100644 --- a/Template Project/src/i2c_scanner.cpp.disabled +++ b/Template Project/src/i2c_scanner.cpp.disabled @@ -35,8 +35,7 @@ void setup() { Wire.begin(14,33); - Serial.begin(9600); - while (!Serial); // Leonardo: wait for serial monitor + Serial.begin(115200); // Leonardo: wait for serial monitor Serial.println("\nI2C Scanner"); } diff --git a/Template Project/src/input_test.cpp b/Template Project/src/input_test.cpp new file mode 100644 index 0000000..51e34ae --- /dev/null +++ b/Template Project/src/input_test.cpp @@ -0,0 +1,17 @@ +#include "ESPMegaPRO.h" + +void setup() { + ESPMega_begin(); + Serial.begin(115200); +} + +void loop() { + if(ESPMega_digitalRead(7)) { + ESPMega_digitalWrite(8, HIGH); + Serial.println("7HIGH"); + } else { + ESPMega_digitalWrite(8, LOW); + Serial.println("7LOW"); + } + ESPMega_loop(); +} \ No newline at end of file diff --git a/Template Project/src/main.cpp b/Template Project/src/main.cpp deleted file mode 100644 index 98f2bb3..0000000 --- a/Template Project/src/main.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -void setup() { - ESPMega_begin(); -} - -void loop() { - ESPMega_loop(); -} \ No newline at end of file