This commit is contained in:
Siwat Sirichai 2023-08-26 11:31:28 +07:00
parent dce0beceec
commit 81434a39b5
5 changed files with 23 additions and 14 deletions

View File

@ -6,8 +6,8 @@
#include <Adafruit_PWMServoDriver.h>
#include <PCF8574.h>
#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

View File

@ -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
monitor_speed = 115200

View File

@ -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");
}

View File

@ -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();
}

View File

@ -1,9 +0,0 @@
#include <ESPMegaPRO.h>
void setup() {
ESPMega_begin();
}
void loop() {
ESPMega_loop();
}