Digigurdy-baz
Loading...
Searching...
No Matches
hurdygurdy.h
Go to the documentation of this file.
1#ifndef HURDYGURDY_H
2#define HURDYGURDY_H
3
4#include "config.h"
5#include "keyboxbutton.h"
6
7class HurdyGurdy {
8 private:
9 int keybox_size; // How many keys are in the keybox
10 int max_offset; // The currest highest key being pressed
11 int prev_offset; // The highest key from last loop() cycle
12 bool higher_key_pressed;
13 bool lower_key_pressed;
14
15 public:
17 HurdyGurdy(const int pin_arr[], int key_size);
18
19 int getMaxOffset();
20 bool higherKeyPressed();
21 bool lowerKeyPressed();
22};
23
24#endif
Definition: hurdygurdy.h:7
bool lowerKeyPressed()
Retruns whether or not a lower key is being pressed this cycle.
Definition: hurdygurdy.cpp:61
int getMaxOffset()
Updates all keybox objects, returns the highest key being pressed on the keybox.
Definition: hurdygurdy.cpp:20
bool higherKeyPressed()
Returns whether or not a higher key is being pressed this cycle.
Definition: hurdygurdy.cpp:55
KeyboxButton * keybox[num_keys]
Definition: hurdygurdy.h:16
Definition: keyboxbutton.h:6
const int num_keys
The number of keys on the keybox.
Definition: config.h:233