George Cochrane
/
DrumMachine
very preliminary code, pins clearly havent been chosen yet!
Diff: main.cpp
- Revision:
- 1:0404e9aa397f
- Parent:
- 0:438bb4b2ba51
--- a/main.cpp Tue Jul 02 09:16:17 2013 +0000 +++ b/main.cpp Tue Jul 02 17:50:52 2013 +0000 @@ -1,6 +1,9 @@ #include "mbed.h" #include "readknobs.h" #include "trigger.h" +#include "TextLCD.h" + +TextLCD lcd(PTA1, PTA2, PTA4, PTA5, PTC8, PTC9, TextLCD::LCD20x4); // rs, e, d4-d7 //Analog Ins AnalogIn tmp(PTC2); //Tempo Potentiometer @@ -40,6 +43,7 @@ DigitalOut Beat7(PTC2); DigitalOut Beat8(PTC2); +//GLOBAL Variables int pulse = 4; //Pulse length in ms int mintempo = 60; //Minimum (normal time) tempo int maxtempo = 130; //Maximum (non doubletime) tempo @@ -54,6 +58,7 @@ while (1) { readknobs(); + wait_ms(10); while (enable==1) { beat=0;