Hello,
I am working on a sequencer with layering. Here's the code:
in attachment (sorry it was too long)
The Hardware I am using is the Teensy 3.2, the PJRC audio board, a 10k linear potentiometer, and 9 momentary pushbuttons. The idea is that pressing any of the buttons 1-8 loads a sample into the sequence. Button 9 (digital pin 9) controls which layer of beats plays, 1, 2 or both simultaneously. I am sending 3.3V to the potentiometer via an Arduino Uno, but I am reading its output through the A2 pin of the Teensy.
I would like to calculate current consumption, since the code seems to work fine when only 8 buttons are pulled up, and all the samples play properly.
But when I pull up button 9, none of the samples play. The code continues to go through the sequence that I can see based on the Serial prints in my code. The code seems to function properly except that the samples don't play when button 9 is pulled up. I have come across this in several projects, using the same hardware setup.
Does this sound current related? It seems to have a problem opening the Sd card when the button 9 is pulled up. Interestingly, I can power the 10k pot using the Teensy 3.3V pin instead of the separate Uno, and not have any problems with the code. Which is why I am hesitant to assume it is the current. Also, I should not that I've tried this sketch at all clock speeds, from 96 to 24 mhz.
Thank you
I am working on a sequencer with layering. Here's the code:
in attachment (sorry it was too long)
The Hardware I am using is the Teensy 3.2, the PJRC audio board, a 10k linear potentiometer, and 9 momentary pushbuttons. The idea is that pressing any of the buttons 1-8 loads a sample into the sequence. Button 9 (digital pin 9) controls which layer of beats plays, 1, 2 or both simultaneously. I am sending 3.3V to the potentiometer via an Arduino Uno, but I am reading its output through the A2 pin of the Teensy.
I would like to calculate current consumption, since the code seems to work fine when only 8 buttons are pulled up, and all the samples play properly.
But when I pull up button 9, none of the samples play. The code continues to go through the sequence that I can see based on the Serial prints in my code. The code seems to function properly except that the samples don't play when button 9 is pulled up. I have come across this in several projects, using the same hardware setup.
Does this sound current related? It seems to have a problem opening the Sd card when the button 9 is pulled up. Interestingly, I can power the 10k pot using the Teensy 3.3V pin instead of the separate Uno, and not have any problems with the code. Which is why I am hesitant to assume it is the current. Also, I should not that I've tried this sketch at all clock speeds, from 96 to 24 mhz.
Thank you