Touch.writeRegister8(STMPE_INT_STA, 0xFF) // reset all ints PinMode(PWR_LED, OUTPUT) //Setup power LED
TEENSY AS SPI PROGRAMMER SERIAL
Serial.println("Music Major Project") // serial output Serial.println("Callum Blackmore - 2017") // Print faux splash screen to Tie MODE to 3.3V and POWER CYCLE the STMPE610 (there is no reset pin)Īdafruit_STMPE610 touch = Adafruit_STMPE610(STMPE_CS, SPI_MOSI, SPI_MISO, SPI_SCK) SDI to MOSI, SDO to MISO, and SCL to SPI CLOCK
GUItool: end automatically generated codeĬonst byte STMPE_CS = 15 // Touch Screen Controller Chip Select GUItool: begin automatically generated codeĪudioSynthWaveform waveform1 //xy=97,100ĪudioSynthWaveform waveform2 //xy=97,137ĪudioEffectEnvelope envelope1 //xy=514,104ĪudioConnection patchCord1(waveform1, 0, mixer1, 0) ĪudioConnection patchCord2(waveform2, 0, mixer1, 1) ĪudioConnection patchCord3(mixer1, envelope1) ĪudioConnection patchCord4(envelope1, 0, mixer2, 0) ĪudioConnection patchCord5(mixer2, 0, dac1, 0) Here's a copy of the output to the serial monitor without dac1.begin() with me randomly pressing on the touch screen (source code is under): =
I'm not sure if I'm missing something in my setup function or if I specifically have to output audio in the loop function. I don't think that function is required but after looking at the source code for the library, I found it so I thought I'd give it a go.
I can see that the program is getting through to where the audio should be played but nothing seems to want to work.Īfter adding dac1.begin(), the program hangs and only prints out the initial project title. The issue I'm having is that I can't seem to get any audio to play through either the onboard DAC or through the digital USB interface that's passed through to the computer.
TEENSY AS SPI PROGRAMMER SOFTWARE
I had originally planned on going with a hardware based setup but after fighting with different circuits, I've decided to go with software which I'm much more comfortable with. I'm working on my final project for my music degree (the idea is exploring alternative input methods for interacting with electronic instruments) and I'm putting together a touch screen based synth using the Teensy 3.2 and the Adafruit STMPE610.