Вот код:
/**************
* ---------------------- OUTPUT & INPUT Pin table ---------------------
* +---------------+-------------------------+-------------------------+
* | ESP8266 | D1(IO5), D2(IO4), | D0(IO16), D1(IO5), |
* | | D5(IO14), D6(IO12), | D2(IO4), D5(IO14), |
* | | D7(IO13), D8(IO15), | D6(IO12), D7(IO13), |
* | | | D8(IO15) |
* +---------------+-------------------------+-------------------------+
*/
#include <RBDdimmer.h>//
//#define USE_SERIAL SerialUSB //Serial for boards whith USB serial port
#define USE_SERIAL Serial
#define outputPin D6
#define zerocross D5 // for boards with CHANGEBLE input pins
dimmerLamp dimmer(outputPin, zerocross); //initialase port for dimmer for ESP8266, ESP32, Arduino due boards
int outVal = 0;
void setup() {
USE_SERIAL.begin(9600);
dimmer.begin(NORMAL_MODE, ON); //dimmer initialisation: name.begin(MODE, STATE)
}
void loop()
{
outVal = map(analogRead(0), 1, 1024, 100, 0); // analogRead(analog_pin), min_analog, max_analog, 100%, 0%);
USE_SERIAL.println(outVal);
dimmer.setPower(outVal); // name.setPower(0%-100%)
}
Выдает это в порт:
00:37:45.290 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
00:37:45.359 -> ⸮g⸮ISR not in IRAM!
00:37:45.428 ->
00:37:45.428 -> User exception (panic/abort/assert)
00:37:45.481 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
00:37:45.539 ->
00:37:45.539 -> Abort called
00:37:45.574 ->
00:37:45.574 -> >>>stack>>>
00:37:45.574 ->
00:37:45.574 -> ctx: cont
00:37:45.609 -> sp: 3ffffed0 end: 3fffffc0 offset: 0000
00:37:45.643 -> 3ffffed0: feefeffe feefeffe feefeffe feefeffe
00:37:45.677 -> 3ffffee0: 000000fe 00000000 00000000 00000000
00:37:45.745 -> 3ffffef0: 00000000 00000000 00000000 00ff0000
00:37:45.814 -> 3fffff00: 5ffffe00 5ffffe00 00000020 00000000
00:37:45.850 -> 3fffff10: 00000002 0000000e 0000000e 40202056
00:37:45.919 -> 3fffff20: 4010072e 3ffef454 3ffef43c 40202068
00:37:45.954 -> 3fffff30: 0000001c 00002580 0000000e 402025b9
00:37:46.022 -> 3fffff40: 00000000 40203075 ffffffff 00000001
00:37:46.056 -> 3fffff50: feefeffe 00000001 3ffee5ec 3ffee654
00:37:46.125 -> 3fffff60: 3fffdad0 00000000 0000000e 40202668
00:37:46.159 -> 3fffff70: 00000000 feefeffe feefeffe 4020125d
00:37:46.194 -> 3fffff80: 00002580 0000001c 3ffee35c 40201296
00:37:46.261 -> 3fffff90: 3fffdad0 00000000 3ffee614 40201042
00:37:46.294 -> 3fffffa0: feefeffe feefeffe feefeffe 40201c5c
00:37:46.362 -> 3fffffb0: feefeffe feefeffe 3ffe84ec 40101029
00:37:46.396 -> <<<stack<<<
Правильно я понимаю, что не будет с вемосом этот код работать, потому как ISR у него нет?
Благодарю!