Above: getting started video showing how to use our menu library with Arduino. Link to the Getting started with tcMenu Slides (from youtube video). TcMenu is a complete menu solution for Arduino and mbed platforms that supports a wide range of input / display devices, and can be remotely controlled using embedCONTROL or using our Java Remote API on supported hardware. This page walks you through using tcMenu Designer to design and build an embedded application.
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.
Using the LEDDisplay library LEDDisplay is an easy to use library that makes light work of multi-digit 7segment displays. If you need help building the circuit or understanding the concepts, then refer to this guide: Arduino multiple digit, 7 segment display tutorial. Answering questions and getting help Get help from the community forum for LEDDisplay You can also contact us about commercial support on LEDDisplay Setting up the LEDDisplay library Before using any methods from the library, and usually in the global scope (outside of any function) you need to include the header file and initialise the library.
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 know how many items to expect, and do not wish for it to resize, or you can rely on platform defaults, for more general purpose cases.
TcMenu allows you to take over the display from the renderer very easily, once you own the display, you will be called back at regular intervals by the rendering class, and it is your responsibility to update the display at this time (if there are changes that require redrawing). You should never update the screen outside of these callbacks, as doing so would interfere with TcMenu rendering. There are two choices in this case, a functional approach based on providing a callback function, or an object oriented approach, where you provide an extension of CustomDrawing to the renderer.
MenuManager contains the functions to manage menu items, there is a global instance of this class called menuMgr. Here we present the most commonly used features, check out the reference docs for more details. There are a lot of iteration helper functions that can be used to navigate through menu structures. These are described further down the page. The following two reference documentation pages extend on the information here: Menu iteration reference docs MenuManager reference docs Enabling next and back functionality To enable next, back or both, you provide the pin onto which you’ve connected the button for this function.
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 0 RS EN 1 RW RW 2 EN RS 3 Backlight Backlight 4 D4 D4 5 D5 D5 6 D6 D6 7 D7 D7 Construction for Option 1 outside of any functions (global):
There are often cases when you’ll need to run a micro controller from a battery power source. Unlike when running from mains power, every milli-amp matters. In these cases IoAbstraction’s task manager is able to integrate easily with most low power libraries. Task manager works by repeatedly calling the runLoop() function within loop() or main, during each loop task manager evaluates if any tasks are yet ready to run, and if they are it runs them.
TcMenu supports a wide range of rendering devices, from HD44780 based units using our LiquidCrystal fork through to mono OLED’s and full colour TFT displays using the Adafruit_GFX library. In order to achieve such a wide range of displays the renderer describes things in terms of menu items, active positions, editors and dialogs. This allows each renderer to convert these concepts into something that works for it’s needs. You can also easily take over the display to draw your own screen at any time.
It is possible to secure sub-menus in tcMenu by setting the secured switch in the designer UI. Once this is done, and as long as there is an authenticator within your sketch that is assigned to the menu manager, then there is nothing else to do. First, during the design phase, ensure that you select to secure the sub-menu. It is recommended that such menus are marked as local only, so they cannot be sent remotely: