Commanders
Arduino buttons/bus library
Commanders Documentation

A full explanation in French can be read at http://www.locoduino.org/spip.php?article165 .

The goal of this library is to virtualize input through a lot of ways (hardware buttons, bus, radio and so on) in order to be able to drive the rest of the sketch without taking care of the way the information was got.

Passing this information from the commanders through the accessories is done by events of type COMMANDERS_TYPE_EVENT. Each event have an Id, a type (MOVE, TOGGLE, MOVEPOSITION, LEFT, RIGHT, TOP, BOTTOM, etc... An additional integer is added with some events to complete the event information : the position value for MOVEPOSITION for instance.

Each kind of Commanders can be excluded from compilation, for memory problems purpose or for naming conflicts. Inside some Commanders, sub items can be excluded too, like the different kind of buttons in the ButtonsCommander. You can exclude some parts of library here, to avoid losing program and data memory on parts you don't use. For example, if you don't want DCC railroad modeling command protocol, just uncomment the line #define NO_DCCCOMMANDER by removing // at the beginning.

CANCommander is excluded by default, because this is a rare usage of the library, and the associated CAN library mcp_can consume memory for nothing if this commander is not used.

This software is Copyright (C) 2015-2019 thierry Paris / Locoduino. Use is subject to license conditions. The main licensing options available are GPL V2 or Commercial:

Open Source Licensing GPL V2
This is the appropriate option if you want to share the source code of your application with everyone you distribute it to, and you also want to give them the right to share who uses it. If you wish to use this software under Open Source Licensing, you must contribute all your source code to the open source community in accordance with the GPL Version 2 when your application is distributed. See http://www.gnu.org/copyleft/gpl.html
Commercial Licensing
This is the appropriate option if you are creating proprietary applications and you are not prepared to distribute and share the source code of your application. Contact info@open.com.au for details.