ButtonBoard

back to FEHIO

Description

Library: FEHIO.h

This object provides a unique set of functions designed specifically for use with the provided Proteus ButtonBoard. This object inherits directly from the DigitalInputPin class, but it differs from a standard DigitalInputPin by providing additional capabilities to monitor the state of each button on the ButtonBoard. The ButtonBoard can be declared in any of the 4 banks of the Proteus. Note that unlike the LCD and RPS global objects, the buttons object is not global, and its scope is confined to your main program. If you want the buttons object to be global, move the declaration above your main program.

For more information on Flex I/O software enumerations, visit the Hardware page.

Member Functions

bool LeftPressed()
bool LeftReleased()
bool MiddlePressed()
bool MiddleReleased()
bool RightPressed()
bool RightReleased()

Declaration

ButtonBoard <variable name>(FEHIO::FEHIOPort);

Example

#include <FEHIO.h>

int main(void)
{
    //declares a button board on bank 3
    ButtonBoard buttons(FEHIO::Bank3);
}