Comments (4)
Ok some investigation later :
-
commenting #define INT_vect lines in the header file make the compilation ok (I did not test the functionnal aspect as I debug this remotely for a friend without hardware to test it).
-
seems like the interrupt method used in void dimmerLamp::ext_int_init(void) is not compatible with the Arduino standard which use attachInterrupt to keep track of the different IST method associated to each interrupt pins.
-
doing so the ISR(INT_vect) come in conflic with the core library
I will try some fixes but I will not have so much time to work on it correctly. This error could be common with other open issues so I hope it will help someone to correct it at one point :)
from rbddimmer.
Replacing content of ext_int_init by attachInterrupt(INTx,ISR_RBD,RISING); should do the trick. You will also have to declare ISR function befor ext_int_init and change ISR name by ISR_RBD.
from rbddimmer.
Hi! , thank you for the research of the library issue. I have same issue with the interruptions (I use another device on port D3).
I'm trying to follow your advices, but I don't exactly know how to "declare ISR function before ext_int_init" - I just copied it before ext_int_init and renamed it to ISR_RBD. I get this error:
/mnt/create-efs/webide/16/d4/16d4ee6b75059aa8801ddf6d27b06fde:lubos257/libraries_v2/RBDdimmer/src/avr/RBDmcuAVR.cpp:80:8: error: expected constructor, destructor, or type conversion before '(' token
ISR_RBD(INT_vect)
^
/mnt/create-efs/webide/16/d4/16d4ee6b75059aa8801ddf6d27b06fde:lubos257/libraries_v2/RBDdimmer/src/avr/RBDmcuAVR.cpp: In member function 'void dimmerLamp::ext_int_init()':
/mnt/create-efs/webide/16/d4/16d4ee6b75059aa8801ddf6d27b06fde:lubos257/libraries_v2/RBDdimmer/src/avr/RBDmcuAVR.cpp:92:23: error: 'ISR_RBD' was not declared in this scope
attachInterrupt(INTx,ISR_RBD,RISING);
Could you be more specific with "declare ISR function before ext_int_init" ,
2. question, down in the code of ccp file is also anothre ISR function: ISR (TIMER_COMPA_VECTOR(DIMMER_TIMER))
, should I rename also that one?
Sorry for stupid questions, I'm beginner with programming.
from rbddimmer.
Well by replacing the normal content of ext_int_init activate the function which implicitely link to
ISR(INT_vect)
{
for (int i = 0; i < current_dim; i++ )
if (dimState[i] == ON)
{
zeroCross[i] = 1;
}
}
By changing it to attachInterrupt(INTx,ISR_RBD,RISING); the link become explicit so you can replace the previous function by
ISR_RBD()
{
for (int i = 0; i < current_dim; i++ )
if (dimState[i] == ON)
{
zeroCross[i] = 1;
}
}
But then you need to declare it (move it) befor the declaration of ext_int_init ;)
from rbddimmer.
Related Issues (20)
- Inquire about the pinout (Dimming and Zero-Cross) of the DIY IoT AC-Dimmer KIT module, ESP8266 Wi-Fi D1
- My Codes Stake can Someone help me HOT 1
- F4 support is real ? HOT 3
- Change pin for zero-cross in Arduino Mega ATMega2560 HOT 1
- Relay not opening
- ESP32 : code source works ? HOT 3
- Not working on Arduino Nano 33 boards HOT 4
- Timing issue HOT 5
- RBDDimmer and MAX6675, Reboot itself HOT 5
- not working on ESP32 at all HOT 1
- Won't compile for a ESP32
- Dimmer Output is Dimmed during Serial Print
- Tacho feedback
- more esp32 dimmer outputs HOT 1
- RP2040 support
- RBD Dimmer AVR
- What license is this library under?
- Why can't the Arduino Uno/Nano's Zero Cross input pin be changed? (NOT CHANGABLE)
- 100 to 0 switching not proper HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rbddimmer.