TheCodersCorner.com items tagged with library.

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...

LiquidCystalIO with a DfRobot shield

By dave

DfRobot provides the simplest way to get started with LiquidCrystalIO on Uno and Mega (and other compatible boards). It has a display with an array of switches connected to A0 (up, down, left, right and select). This library works correctly with the display and even has a shorthand way of creating the LCD for this case. Connections to an Arduino Uno,...

IoAbstraction Analog Core documentation

By dave

IoAbstraction has a simple interface to the analog capabilities of all supported boards. It provides frequently used functionality around acquiring and setting analog values from ADC, PWM and DACs. Having the ability to read and write analog values as float, where the value is between 0 and 1; where 0 is off and 1 is fully on. this capability allows you...

IoAbstraction: Arduino Pins, IO Expanders, Shift Registers using same code

By dave

Using IoAbstraction you can write a sketch / program that uses Arduino pins, shift registers and IO expander devices at the same time, very much like you'd normally use Arduino pins. This library also provides simple interrupt handling that again is consistent across Arduino, mbed and IO expander ICs. What do we mean by consistent, we mean that configuring a pin,...

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...

Simple Collection - btree list

By dave

IoAbstraction contains a very simple collection that is relatively lightweight and works on a wide range of boards. It is a btree list that provides ordering and list storage. It works on anything from Arduino Uno upwards! It's memory usage is very configurable, and the way it resizes arrays is also configurable too. You can set the initial size if you...

Simple Collection - Thread safe circular buffer

By dave

Circular buffer provides an easy way to interact with events that take place on another thread or in an interrupt, it is not very efficient when used on a single thread because it uses atomic operations to ensure consistency of the buffer. It is an advanced collection for use by users that understand threading and writing interrupt safe code. There are...

LiquidCystalIO with PCF8574 i2c backpack

By dave

An I2C LCD backpack based on the PCF8574 chip provides an easy way to get started with LiquidCrystalIO on most Arduino boards. It is usually in one of two configurations as listed below. This library works correctly with the display and even has a shorthand way of creating the LCD for this case. Connectivity combinations for i2c backpacks Pin Option1 Option2...

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.