mirror of
https://github.com/ShikyC/Taiko-Drum-Controller-Arduino.git
synced 2024-11-12 00:50:46 +01:00
New design init
This commit is contained in:
parent
49c3ee02aa
commit
3aa41ca472
@ -8,12 +8,13 @@
|
|||||||
* *
|
* *
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
|
|
||||||
// Compatibility with Taiko Jiro
|
// New implementation using fast, stable and sensitive piezoelectric
|
||||||
#define MODE_JIRO 1
|
// ceramic sensors (the same sensors used in electirc drum kit).
|
||||||
|
// No longer need microphones.
|
||||||
|
|
||||||
#define MODE_DEBUG 0
|
#define MODE_DEBUG 0
|
||||||
|
|
||||||
#define CHANNELS 4
|
#define CHANNELS 2
|
||||||
|
|
||||||
// Caches for the soundwave and power
|
// Caches for the soundwave and power
|
||||||
#define SAMPLE_CACHE_LENGTH 12
|
#define SAMPLE_CACHE_LENGTH 12
|
||||||
@ -26,14 +27,8 @@
|
|||||||
// Forced sampling frequency
|
// Forced sampling frequency
|
||||||
#define FORCED_FREQ 1000
|
#define FORCED_FREQ 1000
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <Keyboard.h>
|
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
|
|
||||||
#if MODE_JIRO
|
|
||||||
#define HEAVY_THRES LONG_MAX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned long int lastTime;
|
unsigned long int lastTime;
|
||||||
|
|
||||||
int channelSample [CHANNELS];
|
int channelSample [CHANNELS];
|
||||||
@ -45,9 +40,7 @@ Cache <long int, POWER_CACHE_LENGTH> powerCache [CHANNELS];
|
|||||||
|
|
||||||
bool triggered [CHANNELS];
|
bool triggered [CHANNELS];
|
||||||
|
|
||||||
int pins[] = {A0, A1, A2, A3}; // L don, R don, L kat, R kat
|
int pins[] = {A0, A1}; // Don, Kat
|
||||||
char lightKeys[] = {'g', 'h', 'f', 'j'};
|
|
||||||
char heavyKeys[] = {'t', 'y', 'r', 'u'};
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin (9600);
|
Serial.begin (9600);
|
||||||
|
Loading…
Reference in New Issue
Block a user