MIDI Interface in progress
Dependencies: SPI_TFT_ILI9341 TFT_fonts Touch_tft PowerControl mbed USBMIDI
Revision 8:7f7c0b94815f, committed 2014-02-06
- Comitter:
- MetropoliaMies
- Date:
- Thu Feb 06 09:05:42 2014 +0000
- Parent:
- 7:4aec4a6acac2
- Commit message:
- Reveritaatio 2.00015;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Feb 06 08:37:47 2014 +0000 +++ b/main.cpp Thu Feb 06 09:05:42 2014 +0000 @@ -28,8 +28,6 @@ unsigned int i = 0; for (i = 0; i<10; i++) { //draw buttons - tft.locate(10,50); - printf("Shift"); buttons(i, color); } @@ -39,7 +37,7 @@ { // Tallentaa pitchin - + // Tallentaa painallukset for (i = 0; i < 9; i++) { @@ -52,11 +50,11 @@ //midi.write(MIDIMessage::Noteon(48 + i)); // Debuggaus puttyyn pc.printf("Digital input %d", i); //terminal viesti - - pc.printf(": %d\n\r", key[i].read()); + + pc.printf(": %d\n\r", key[i].read()); } - - + + // Lopettaa midimessagen lähettämisen for (i = 0; i < 9; i++) { if (painetut_nappaimet[i]) @@ -99,17 +97,28 @@ printf(" MIDIMAN! "); tft.line(0,83,239,83,White); - tft.locate(163,250); - printf("Octave up"); - tft.locate(83,250); - printf("Octave dwn"); + + + while (1) { color = White; draw_buttons(color); + tft.locate(180,270); + tft.foreground(Black); + tft.background(White); + printf("Octave"); + tft.locate(190,282); + printf("Up"); + tft.locate(100,270); + printf("Octave"); + tft.locate(102,282); + printf("Down"); + tft.background(Black); // set background to black + tft.foreground(White); // set chars to white while (tft.is_touched(tft.get_touch())) { // touch @@ -122,12 +131,12 @@ printf("%3d",p.y); light_pressed(Red,p); - + tft.locate(160, 0); printf("%i", Octave); tft.locate(160, 12); printf("%i", slider); - + nine_keys();