TheCodersCorner.com items tagged with event-based.

Creating interrupt and threaded events with TaskManager

By dave

In this guide we assume that you are familiar with the API for scheduling tasks on task manager. Let's first discuss what we consider an event to be, and what it means to be an interrupt or threaded event. Interrupt or threaded events are subject to external actors (such as threads or interrupts). In this case the event will invariably be...

How to create a polled event with TaskManager

By dave

In this guide we assume that you are familiar with the API for scheduling tasks on task manager. Let's first discuss what we consider an event to be, and what it means to be a polled event. By polling we mean no external actors (such as threads or interrupts) are involved. Task manager will ask your event instance frequently if it...

Scheduling tasks with Task Manager on Arduino and mbed

By dave

Using TaskManager in your sketches TaskManager is a very simple co-operative coroutines / executor framework that allows work to be scheduled in an internal queue. Instead of writing code using delays, one simply adds jobs to be done at some point in the future. In addition to this, interrupt handling is also supported, such that the interrupt is "marshalled" and handled...

Troubleshooting and mock objects for testing

By dave

Troubleshooting IO issues using LoggingIoAbstraction Within the MockIoAbstraction.h header there is an implementation of BasicIoAbstraction that delegates through a logging layer. If you are having difficulty determining what your code is sending and receiving, this could be useful. You simply introduce the logging abstraction between your regular abstraction and the device you're having trouble with. For example: Mock objects for use...

Programming Arduino using tasks instead of loops - tutorial

By dave

In this tutorial for TaskManagerIO I explain the differences between traditional loop based programming; which is very common on the Arduino platform and event based programming based on taskManager. Although event based programming looks slightly more complicated at first, as the sketch and surrounding code gets more complex, eventing will scale to that much easier. Eventing task frameworks make ongoing maintenance...

Task Manager - Spin Lock guide

By dave

Task Manager supports the concept of Spin Locks to protect sensitive asynchronous operations from becoming interleaved. For example, to protect sensitive blocks of code. Be very aware that this does not include a memory barrier. A spin lock loops waiting for the lock to become available, you can either spin for a period of time, or until the lock is...

All library - Cross platform build support

By dave

Moved, see [arduino-libraries.md] for the list.

Marshalling interrupts into TaskManagerIO tasks

By dave

Interrupt handling is generally an advanced topic, but this library provides a very simple way to handle interrupts. There are two ways to handle interrupts in TaskManagerIO, the first is by marshalling, and the second is by writing an event. We recommend that all new code uses the event method to handle interrupts , although we have no plans to deprecate...

These may be of interest

We use cookies to analyse traffic and to personalise content. We also embed Twitter and Youtube on some pages, these companies have their own privacy policies.

See the privacy policy and terms of use of this site should you need more information or wish to adjust your settings.