TI RSLK Library 0.2.2
Loading...
Searching...
No Matches
Public Member Functions
Bump_Switch Class Reference

Represents a single bump switch. More...

#include <Bump_Switch.h>

Public Member Functions

bool begin (uint8_t pin_num, uint8_t mode=INPUT_PULLUP)
 Initialize the bump switch class.
 
bool read ()
 Read the bump switch value.
 

Detailed Description

Represents a single bump switch.

An instance of this class represents a single Pololus bump switch. The function begin must be called before using any other function.

Definition at line 12 of file Bump_Switch.h.

Constructor & Destructor Documentation

◆ Bump_Switch()

Bump_Switch::Bump_Switch ( )

Definition at line 3 of file Bump_Switch.cpp.

Member Function Documentation

◆ begin()

bool Bump_Switch::begin ( uint8_t  pin_num,
uint8_t  mode = INPUT_PULLUP 
)

Initialize the bump switch class.

Parameters
[in]pin_numPin number on Launchpad connected to bump switch
[in]modefor input pin. Options are the same as standard Energia/Arduino pin mode.

This function needs to be called before any other function is used.

Definition at line 10 of file Bump_Switch.cpp.

◆ read()

bool Bump_Switch::read ( )

Read the bump switch value.

Returns
0 or 1. Value when button pressed or released depends on hardware connection and any pulldown/pullup (internal/external) resistors.

Definition at line 17 of file Bump_Switch.cpp.


The documentation for this class was generated from the following files: