MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Me4Button Class Reference

Driver for Me 4 Button module. More...

`#include <src/Me4Button.h>`

Inheritance diagram for Me4Button:
[legend]
Collaboration diagram for Me4Button:
[legend]

## Public Member Functions
| Me4Button (void)
| Me4Button (uint8_t port)
void | setpin (uint8_t port)
uint8_t | pressed (void)
Public Member Functions inherited from MePort
| MePort (void)
| MePort (uint8_t port)
| MePort (uint8_t port, uint8_t slot)
uint8_t | getPort (void)
uint8_t | getSlot (void)
bool | dRead1 (uint8_t mode=INPUT)
bool | dRead2 (uint8_t mode=INPUT)
bool | dpRead1 (void)
bool | dpRead2 (void)
void | dWrite1 (bool value)
void | dWrite2 (bool value)
int16_t | aRead1 (void)
int16_t | aRead2 (void)
void | aWrite1 (int16_t value)
void | aWrite2 (int16_t value)
void | reset (uint8_t port)
void | reset (uint8_t port, uint8_t slot)
uint8_t | pin1 (void)
uint8_t | pin2 (void)
uint8_t | pin (void)
uint8_t | pin (uint8_t port, uint8_t slot)

## Additional Inherited Members
Protected Attributes inherited from MePort
uint8_t | s1
uint8_t | s2
uint8_t | _port
uint8_t | _slot

## Detailed Description

Driver for Me 4 Button module.

Class: Me4Button

Description
  Declaration of Class Me4Button

Copyright (C), 2012-2016, MakeBlock

## Constructor & Destructor Documentation

## ◆ Me4Button() [1/2]

Me4Button::Me4Button | ( | void |  | ) |

Alternate Constructor which can call your own function to map the Me4Button to arduino port,
no pins are used or initialized here.

Parameters

  [in] | None |

## ◆ Me4Button() [2/2]

Me4Button::Me4Button | ( | uint8_t | port | ) |

Alternate Constructor which can call your own function to map the Me4Button to arduino port,
the slot2 pin will be used for key pin.

Parameters

  [in] | port | - RJ25 port from PORT_1 to M2

## Member Function Documentation

## ◆ pressed()

uint8_t Me4Button::pressed | ( | void |  | ) |

Function
  pressed

Description
  Read key ADC value to a variable.

Parameters

  [in] | None |

Output
  None

Returns
  Return the key vlaue, the value maybe KEY_1,KEY_2,KEY_3,KEY_4,KEY_NULL.

Others
  The key should periodically read, if it was delayed, It will affect the sensitivity of the keys

## ◆ setpin()

void Me4Button::setpin | ( | uint8_t | port | ) |

Function
  setpin

Description
  Set the PIN for button module.

Parameters

  [in] | port | - arduino gpio number

Output
  None

Returns
  None

Others
  None

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

- src/Me4Button.h
- src/Me4Button.cpp