Skip to main content

Questions tagged [interrupt]

Interrupts allow the processor to suspend normal operation temporarily so that a high-priority software or hardware event can be handled instead.

22 votes
3 answers
6k views

Currently, my sketch is checking an input pin every time round the main loop. If it detects a change, it calls a custom function to respond to it. Here's the code (trimmed down to the essentials): ...
Peter Bloomfield's user avatar
21 votes
2 answers
54k views

I am looking at using a 7 channel RC receiver with the Arduino Uno R3. In the documentation, there are mentions of a maximum of 2 interrupt pins, whereas on certain other blogs I have seen mentions of ...
asheeshr's user avatar
  • 3,847
18 votes
1 answer
28k views

Please explain how interrupts work on the Arduino Uno and related boards using the ATmega328P processor. Boards such as the: Uno Mini Nano Pro Mini Lilypad In particular please discuss: What to use ...
Nick Gammon's user avatar
  • 38.9k
16 votes
2 answers
14k views

Stepper motors are often pricey for a large motor. However, with a powerful, standard DC motor and a rotary encoder, you can "simulate" a stepper motor. How accurate are rotary encoders with Arduino ...
Anonymous Penguin's user avatar
14 votes
4 answers
56k views

The documentation for attachInterrupt() says: ... millis() relies on interrupts to count, so it will never increment inside an ISR. Since delay() requires interrupts to work, it will not work if ...
Petr's user avatar
  • 253
11 votes
2 answers
1k views

The following snippets are from TimerOne library source code: // TimerOne.h: void (*isrCallback)(); // TimerOne.cpp: ISR(TIMER1_OVF_vect) // interrupt service routine that wraps a user defined ...
Joonas Pulakka's user avatar
10 votes
1 answer
46k views

I have been trying to count pulses from a 12,500 Hz square wave to trigger an output. Here's the code I have so far. When the Arduino is reset it prints 315 to the serial over a 25 ms sample....
Brandon Whosville's user avatar
9 votes
2 answers
21k views

I am familiar with the keyword Volatile being used to declare variables that are shared among multiple threads on a software application (basically on a multithreaded application). But why do I need ...
user avatar
9 votes
3 answers
6k views

I have an problem, which at first thoughts (and being new to Arduino) I though was a perfect application for an Arduino. However, after trying and failing to implement it I am doubting myself! Simply ...
Nickos's user avatar
  • 93
9 votes
1 answer
6k views

It's clearly documented that when global data is shared with an ISR and the main program, the data needs to be declared volatile in order to guarantee memory visibility (and that only suffices for 1-...
Joonas Pulakka's user avatar
9 votes
1 answer
20k views

I am using Arduino UNO and has kept in SLEEP_MODE_PWR_DOWN mode & want it to wakeup using MPU6050 hardware INT pin (which should send a signal when MPU is in motion). I have used the article https:...
bandejiya's user avatar
  • 317
9 votes
2 answers
4k views

I'm trying to check the frequency of Timer3 using a counter. The value of the counter, declared as volatile, is incremented in the ISR and every second the sum is shown in the main loop and the value ...
UserK's user avatar
  • 559
8 votes
2 answers
2k views

I'm currently playing with Arduino's hardware timers, and a question came to my mind. Let me explain it a bit. Let's suppose I want a certain function to execute every 1024 clock ticks. AFAIK, I ...
Nadia.moe's user avatar
  • 203
7 votes
1 answer
2k views

I am trying to make a small project. Firstly, I want to record voice using a small microphone(electret) for the time button is pressed and on releasing the button, the speaker of my laptop should ...
Sahil Babbar's user avatar
6 votes
2 answers
660 views

I have come across some Andruino Sensors like Motion, Light and all recommend to be connected to pin 2 or 3 on Andruino Uno board which are interrupt pins. This is especially true if you are looking ...
user3646338's user avatar

15 30 50 per page
1
2 3 4 5
41