I've got a question:
Is it allowed, to use GPT and external interrupts within the same sketch?
I've got the feeling that there are serious impacts between these interrupt sources.
Interrupts in 2.0.8
Re: Interrupts in 2.0.8
Sure! we even have a demo sketch with all interrupts together.
Re: Interrupts in 2.0.8
@PoltoS: Which demo sketch would that be?
-
- Posts: 39
- Joined: 12 Aug 2016 12:08
Re: Interrupts in 2.0.8
I am using GPT and two interupts as well with my weather station project.
Is running stable for some months now.
Only important thing is to have only limited code within the interupt routines.
In my case I only have a counter within the routine.
If you don't follow that advice the application might crash from time to time.
Is running stable for some months now.
Only important thing is to have only limited code within the interupt routines.
In my case I only have a counter within the routine.
If you don't follow that advice the application might crash from time to time.
Code: Select all
void int0_handler() // PIN17-wind sensor interupt
{
wind_pulses++;
}
void int1_handler() // PIN18-rain sensor interupt
{
rain_pulses++;
}
void gpt_handler() // 2" Timer
{
GPT_2sec++;
}
Re: Interrupts in 2.0.8
@mdietinger Absolutelly correct comment! We suggest to use minimum of code in setters and getters and even less in interrupts. Those are generic recomendations for all interrupt handles