Artemis Development with the Arduino IDE

Pages
Contributors: santaimpersonator, Liquid Soulder, Member #1571936
Favorited Favorite 3

What About Interrupts?

Interrupts allow users to interrupt the code running in the main loop of their code and execute another set of instructions (with an interrupt handler or interrupt service routine) before returning back to the main loop.

Processor Interrupts with Arduino

December 11, 2018

What is an interrupt? In a nutshell, there is a method by which a processor can execute its normal program while continuously monitoring for some kind of event, or interrupt. There are two types of interrupts: hardware and software interrupts. For the purposes of this tutorial, we will focus on hardware interrupts.

Check out these Arduino pages for more information on interrupts:

Real Time Operating System (RTOS)

With the incorporation of Mbed™ OS into the Apollo3 Arduino core, to support the Bluetooth functionality, it now functions as a RTOS. This increases the complexity of the code implementation. In order to help users understand how to adapt their code to utilize interrupts, we have provided the following examples for the Apollo3 core: File > Examples > Apollo3 > Pick Example

threads example
The Threads example.
attach interrupt example
The AttachInterrupt example.
detach intterrupt example
The DetachInterrupt example.
Click an image to enlarge.

For more details on the RTOS and interrupt functionality, check out the Mbed™ documentation on scheduling APIs.