Timed blink is a version of well known Arduino blink example that is shipped with the standard IDE, but is redesigned to use the Abstraction and timer library. Example circuit for the code is exactly the same a blink, and if you use the inbuilt LED pin (which it does by default) then there’s no need to build any circuit whatsoever. Instead of using delay() calls to set the duration of the led flash, it uses the task management library to schedule a task.
IoAbstraction has full support for interrupts on most devices, meaning we can connect a Rotary Encoder to an Arduino using a standard PCF8574 IO expander chip. In order to do this we need the PCF8574 /INT line to be connected to an Arduino pin that supports interrupts (such as pins 2 or 3). Further, you can also have switches handle push button input without polling, by initialising for interrupt, especially useful with IO exapnders.
Matrix keyboards are arranged such that the keys are in a matrix of rows and columns. This means that instead of needing a spare input for each key, one INPUT for each column and one OUTPUT for each row is all that’s needed. In order to use the keyboard, we create a class of type MatrixKeyboardManager and configure it with an IoAbstractionRef, a KeyboardLayout that describes the keyboard attached (there are some standard ones already defined) and a listener that will be informed of changes.
Have you ever wanted to treat button presses in Arduino similar to other languages, where you get an event callback when the switch is pressed? Look no further, the IO abstraction library can do that with very little fuss. In fact it can also do the same for rotary encoders as well, treating them similar to how scroll bars work in desktop applications. To start we need to get the IoAbstraction library and open the buttonRotartyEncoder example.
Recently, I have made a fork of Arduino LiquidCrystal (HD44780 display driver library) that allows the library to work with the IO abstraction library, meaning you can configure a display to use Arduino pins, an i2c 8574 IO expander or shift registers by simply changing one line of code in your sketch. There are two additional examples provided with this version that show how to use the fork with both a shift register and an 8574 i2c IO expander.
Here we demonstrate the IO Abstraction library on an Arduino with a PCF8574 i2c 8-bit IO expander chip. We use the device in order to receive input from a switch and light an LED. It’s about the most basic example possible that has both input and output. To use this example, first download the IoAbstraction library. Devices such as the PCF8574 provide an easy way to expand both input and output capabilities using a single chip, and because it’s on i2c, needs only two pins from the Arduino (SDA and SCL).
Requirements Requires tcMenu V2.0 or greater. Current support: ESP32 touch sensor hardware. Touch-pad sensor summary Touch-pad sensors check for button presses without an actual switch, instead the rely on a change in capacitance when the user touches an area (usually a small metal plate around the size of a finger. Given that this procedure is quite complex, it usually requires hardware support for such inputs, so it can only ever be supported when hardware allows.
Requires tcMenu V2.0 or greater. TcMenu resistive touch screen input plugin supports four wire resistive touch devices that are often fitted in front of color TFT displays. This plugin requires two ADC analog inputs, but note that all pins must be output capable. The connectors are often referred to as X+, X-, Y+ and Y-. In all cases X- and Y+ must be connected to ADC (analog input) capable pins.
DfRobot input and display plugin make generating a menu for DfRobot shields very simple. There’s no configuration needed in order to produce a menu. This plugin auto configures the display to use LiquidCrystalIO library and sets up switches to use the micro-switches connected to analog input A0. Setting up for your menu First, ensure your menu structure is saved and then choose Code -> Generate Code from the menu. Once the code generation dialog appears, to the right of the current input type will be a button named “Change”.
TcMenu base input plugin supports Rotary Encoders that are either connected directly to Arduino pins or via an I2C expander such as a PCF8574 or MCP23017. This support is provided by the IoAbstraction library that’s automatically included by the menu designer UI. The only limitation for rotary encoders is that PinA must be connected to an interrupt capable pin (or if connected to an i2c device that must be connected to an interrupt capable pin).