convert to MQS (move keyboard and display to suit)

This commit is contained in:
Jorj Bauer 2020-07-15 10:19:57 -04:00
parent ae47fb63df
commit 97888eec7a
3 changed files with 11 additions and 9 deletions

View File

@ -12,10 +12,10 @@
#define PIN_RST 8
#define PIN_DC 9
#define PIN_CS 10
#define PIN_MOSI 11
#define PIN_MISO 12
#define PIN_SCK 13
#define PIN_CS 0
#define PIN_MOSI 26
#define PIN_MISO 1
#define PIN_SCK 27
// Inside the 320x240 display, the Apple display is 280x192.
// (That's half the "correct" width, b/c of double-hi-res.)

View File

@ -16,7 +16,7 @@ char keys[ROWS][COLS] = {
};
uint8_t rowsPins[ROWS] = { 33, 34, 35, 36, 37 };
uint8_t colsPins[COLS] = { 0, 1, 3, 4, 24, 25, 26, 27, 28, 29, 30, 31, 32 };
uint8_t colsPins[COLS] = { 41, 40, 3, 4, 24, 25, 39, 23, 28, 29, 30, 31, 32 }; // 0, 1, 26, 27 are moving to ... 41, 40, 39, 23?
Keypad keypad(makeKeymap(keys), rowsPins, colsPins, ROWS, COLS);
LRingBuffer buffer(10); // 10 keys should be plenty, right?

View File

@ -5,13 +5,14 @@
#include <SPI.h>
TeensyAudio audioDriver;
//AudioMixer4 mixer2; //xy=280,253
AudioMixer4 mixer2; //xy=280,253
AudioMixer4 mixer1; //xy=280,175
AudioOutputI2S i2s; //xy=452,189
//AudioOutputI2S i2s; //xy=452,189
AudioOutputMQS i2s; //xy=452,189
AudioConnection patchCord1(audioDriver, 0, mixer1, 0);
//AudioConnection patchCord2(audioDriver, 0, mixer2, 0);
//AudioConnection patchCord3(mixer2, 0, i2s, 1);
AudioConnection patchCord2(audioDriver, 0, mixer2, 0);
AudioConnection patchCord3(mixer2, 0, i2s, 1);
AudioConnection patchCord4(mixer1, 0, i2s, 0);
#include "globals.h"
@ -55,6 +56,7 @@ TeensySpeaker::~TeensySpeaker()
void TeensySpeaker::begin()
{
mixer1.gain(0, 0.1f); // left channel
mixer1.gain(1, 0.1f); // right channel
memset(soundBuf, 0, sizeof(soundBuf));