Все сообщения

Q: I am trying to use your RobotDyn AC Light Dimmer module with an Arduino ATTiny85. I get a compiler error even on the simplest built in example. Code: #include // #define outputPin 5 #define zerocross 2 // for boards with CHANGEBLE input pins //dimmerLamp dimmer(outputPin, zerocross); //initialase port for dimmer for ESP8266, ESP32, Arduino due boards dimmerLamp dimmer(outputPin); //initialase port for dimmer for MEGA, Leonardo, UNO, Arduino M0, Arduino Zero int outVal = 0; void setup() { 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%); dimmer.setPower(outVal); // name.setPower(0%-100%) } Error: Error message (it repeats): #define _OCRxAL(X) OCR ## X ## A ^ C:UsersMitchDocumentsArduinolibrariesRBDDimmer-mastersrcavrRBDmcuAVR.h:67:19: note: in expansion of macro '_OCRxAL' #define OCRxAL(X) _OCRxAL(X) ^~~~~~~ C:UsersMitchDocumentsArduinolibrariesRBDDimmer-mastersrcavrRBDmcuAVR.cpp:75:2: note: in expansion of macro 'OCRxAL' OCRxAL(DIMMER_TIMER) = OCRxAL_VALUE; ^~~~~~ C:UsersMitchDocumentsArduinolibrariesRBDDimmer-mastersrcavrRBDmcuAVR.cpp:19:19: error: 'TOIE2' was not declared in this scope #define _TOIEx(X) TOIE ## X ^ C:UsersMitchDocumentsArduinolibrariesRBDDimmer-mastersrcavrRBDmcuAVR.cpp:20:18: note: in expansion of macro '_TOIEx' #define TOIEx(X) _TOIEx(X) ^~~~~~ C:UsersMitchDocumentsArduinolibrariesRBDDimmer-mastersrcavrRBDmcuAVR.cpp:77:32: note: in expansion of macro 'TOIEx' TIMSKx(DIMMER_TIMER) |= (1 << TOIEx(DIMMER_TIMER)); //timer interrupt enable ^~~~~ C:UsersMitchDocumentsArduinolibrariesRBDDimmer-mastersrcavrRBDmcuAVR.cpp:19:19: note: suggested alternative: 'TOIE0' #define _TOIEx(X)

Задавает BG103717413 на 2020-04-19 04:03:37

Wharfinger Currently, the database is not compatible with the ATTINY module. It is recommended to use the ARDUINO 2560/328 board, ESP8266 module, and M0 board.

2020-04-27 10:12:38 полезный (0)
ответы (1)