Estimado Luis.
Estoy intentando utilizar tu código sobre una placa con ESP32-WROOM y no consigo compilarlo. Creo que da fallo con la
librería YetAnotherArduinoPcIntLibrary que no es compatible con la arquitectura del ESP32.
Estoy intentando combinar varios sónares y una pantalla Nextion, usando un ESP32, y no consigo que funcione el sónar de las formas habituales. He probado ya sin éxito varias formas.
¿Tienes alguna experiencia o solución al respecto? Muchas gracias de antemano.
ATENCIÓN: la librería YetAnotherArduinoPcIntLibrary-master pretende ejecutarse sobre arquitectura(s) avr y puede ser incompatible con tu actual tarjeta la cual corre sobre arquitectura(s) esp32.
In file included from C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:29:0:
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\PinChangeInterruptBoards.h:64:2: error: #error PinChangeInterrupt library does not support this MCU.
#error PinChangeInterrupt library does not support this MCU.
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp: In static member function 'static void PcInt::attachInterrupt(uint8_t, PcInt::callback, void*, uint8_t, bool)':
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:117:51: error: 'digitalPinToPCICR' was not declared in this scope
volatile uint8_t * pcicr = digitalPinToPCICR(pin);
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:118:51: error: 'digitalPinToPCMSK' was not declared in this scope
volatile uint8_t * pcmsk = digitalPinToPCMSK(pin);
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:119:47: error: 'digitalPinToPCICRbit' was not declared in this scope
uint8_t portGroup = digitalPinToPCICRbit(pin);
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:120:45: error: 'digitalPinToPCMSKbit' was not declared in this scope
uint8_t portBit = digitalPinToPCMSKbit(pin);
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:31:52: error: 'SREG' was not declared in this scope
#define WITHOUT_INTERRUPTION(CODE) {uint8_t sreg = SREG; noInterrupts(); {CODE} SREG = sreg;}
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:125:5: note: in expansion of macro 'WITHOUT_INTERRUPTION'
WITHOUT_INTERRUPTION({
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp: In static member function 'static void PcInt::detachInterrupt(uint8_t)':
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:146:51: error: 'digitalPinToPCICR' was not declared in this scope
volatile uint8_t * pcicr = digitalPinToPCICR(pin);
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:147:51: error: 'digitalPinToPCMSK' was not declared in this scope
volatile uint8_t * pcmsk = digitalPinToPCMSK(pin);
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:148:47: error: 'digitalPinToPCICRbit' was not declared in this scope
uint8_t portGroup = digitalPinToPCICRbit(pin);
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:149:45: error: 'digitalPinToPCMSKbit' was not declared in this scope
uint8_t portBit = digitalPinToPCMSKbit(pin);
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:31:52: error: 'SREG' was not declared in this scope
#define WITHOUT_INTERRUPTION(CODE) {uint8_t sreg = SREG; noInterrupts(); {CODE} SREG = sreg;}
^
C:\Users\antonio\Documents\Arduino\libraries\YetAnotherArduinoPcIntLibrary-master\src\YetAnotherPcInt.cpp:154:5: note: in expansion of macro 'WITHOUT_INTERRUPTION'
WITHOUT_INTERRUPTION({
^
exit status 1
Error compilando para la tarjeta WEMOS LOLIN32.