Yes, setting the pinMode to INPUT_DISABLE (which is the correct setting when using the pin to read input analog voltages) definitely sets the pin to an input, disabling the pin's output drivers.
Make sure to note that when using analog MUXs (in...
Maybe <this> is the post that you are recalling ?? This may or may not apply, as the post recommends adding the "DSB" command at the end of an interrupt function when using the T4.x (which is much faster than the T3.x).
Mark J Culross
KD5RXT
Instead of this (which would be appropriate when using a pin as a *digital* input. . . leaves the bus keeper that Mark T mentioned enabled):
pinMode(ACUR1, INPUT);
pinMode(ACUR2, INPUT);
Use this (which is appropriate when using a pin for...
Tim:
For reference, my USB MIDI keyboard sends MODWHEEL & PITCHBEND MIDI messages anytime those controls are moved, independent of whether any keys are pressed or not.
Your plan for monitoring for changes & sending appropriate MIDI messages for...
@tim:
You should be able to use the PITCHBEND & MODWHEEL pots exactly as wired. PITCHBEND usually has some mechanical mechanism to return it to center when not activated, so I'll assume that this is the case in my functional description below...
Since this is the Teensy forum, the obvious recommendation would be to consider using a Teensy to drive your LEDs (I use the Teensy 4.0 for my customized LED strip under the canopy of my RV), as it does the job very well.
Mark J Culross
KD5RXT
Check if <Aria Maestosa> will do what you're looking for. Also, if you've not used <MIDI-OX> before, it is great for monitoring all MIDI activities.
Hope that helps . . .
Mark J Culross
KD5RXT
I've now gathered a more complete set of results from my local USB serial benchmark testing for analysis/comparison.
Teensy hardware setup #1 (block writes):
Teensy 4.0 running sketch given in post #7 above (as posted, unmodified i.e. using...
I am running Arduino 1.8.19, with TD 1.59beta3 installed. I would definitely recommend that you update to the latest Arduino, & that you install at least TD 1.58.
The Crash Report (if any) will show up in the Serial Monitor that you have to...
[ Please see post #11 below for a more complete report, including results for both block writes & single writes ]
OK, I've gathered my local USB serial benchmark testing results for analysis/comparison.
Teensy hardware setup:
Teensy 4.0...
@Nominal Animal : I'll give this a try later today. I have one fairly powerful laptop (modern gaming machine . . . I don't game much, but before retirement, I did lots of linux software development, & typically tested with anywhere from three to...
Here is the sketch I use for Teensy USB Serial benchmarking:
// SPDX-License-Identifier: CC0-1.0
// Size of outgoing buffer
constexpr size_t packet_size = 32;
constexpr size_t packet_words = packet_size / 4;
uint32_t...
OK, I loaded up your entire project, built it for the T4.0 (that's where I currently have my Audio Adapter connected to, but I'd expect that a T4.1 would work the same with this setup).
I started with your sources extracted directly from your...
@Regis:
My apologies !! I completely missed the surrounding c-style comment marks.
I'll load up your entire project & try to give it a closer look to see if I can find anything.
Mark J Culross
KD5RXT
Regis:
I did not load up your entire project, but in looking at the SimpleSynthInstrument.h file that you pointed out, there are multiple definitions for two of the audio patch connections, specifically patchCord7 & patchCord8...
Of everything that you have described, the LCD screens are likely to be the biggest challenge, but even those can be tamed. You'll probably want to look for an LCD screen that uses the SPI interface, such as <this> one. The key here is that all...
Likewise, I can confirm that your latest sketch works here. Congrats !! You've successfully found "what" it takes, but now "why" does it work ?? Asking for a friend, of course :) . . .
Mark J Culross
KD5RXT
@snowsh:
Sorry for the red herring from the "extra" MIDI stuff !! I really should have cleaned out that test sketch before posting it last night. Please see the cleaner version in #42 above & the intermediate results that go along with it. We...
A simplified test program (cleaned up) with the timed attempt to clear buffered clock messages commented out (to demonstrate how the problem presents itself):
#include <MIDI.h>
unsigned long currentRXtime;
unsigned long previousRXtime;
bool...
@snowsh:
Did you try the actual simplified sketch that I posted ?? For comparison, I also tried the sketch that you posted in #32 above, and I can confirm that it still showed the failure to clear the buffered clock messages in my environment...
@PaulS:
Did you try the sketch that I posted earlier & if so, did it work at your end ?? Note that I also tried the sketch that snowsh posted in #32 above, but it still showed the failure to clear the buffer for me as well.
Mark J Culross
KD5RXT
I'll throw my hat into the ring here . . .
Since calling while (usbMIDI.read()); in the setup() function has been demonstrated to be ineffective at flushing the buffered clock messages, that got me to wondering if maybe something happens WRT the...
Based upon the explanation for 9 blinks, checking for a Crash Report might provide further insight into what's going wrong.
To view the Crash Report, add the following in your setup() function & open the Serial Monitor in the Arduino IDE to see...
<This> website has several approaches to choose from. Personally, I have successfully used the "two cascaded BJT" approach in several projects. I make use of the Adafruit PowerBoost 1000C battery management module with a LiPo in many of my...