Search results

  1. H

    Loop to slow for MIDI library read() method

    Thanks everyone. Before anyone answered I tried a few things: - Making a sketch for the OLED by itself without 'clearDisplay()', and having the display show the value of one potentiometer on the screen and nothing else. The value wrote over itself using the 'WHITE,BLACK' text color setting...
  2. H

    Loop to slow for MIDI library read() method

    Hello again everybody! I'm using callbacks from the MIDI library found here. There is an issue. I have an SSD1306 i2c OLED using the Adafruit_SSD1306 library that causes my loop to go from ~1ms to >30ms when it is being updated. This interferes greatly with my incoming MIDI clock signal. I can...
  3. H

    Using IntervalTimer for DAC and (de)Multiplexer

    Hello, Being new to the use of interrupts, I'm wondering whether or not using IntervalTimer is appropriate for my purposes. I intend to demultiplex an analog signal from a DAC, to where each output of the multiplexer sends out a discrete signal. For context, this will be used as several...
  4. H

    Questions about Level shifting for DAC, and using two different power sources

    Perfect, I just happen to have one of those on hand. Thank you!
  5. H

    Questions about Level shifting for DAC, and using two different power sources

    Hello all, I am powering an MCP4725 DAC using the Teensy 4.1. I would like to boost the 3.3v output of the DAC to 5v, to produce control voltage for use in a modular synth environment. My first question is simple: Can I power the DAC straight from a 5v rail, or should I use something like a...
  6. H

    I broke a capacitor on my 4.1. Have I replaced it with the correct one?

    It's working, so at least I did something right!
  7. H

    I broke a capacitor on my 4.1. Have I replaced it with the correct one?

    in an attempt to wedge my board off of a perfboard that it had been desoldered from, I broke capacitor c27 off. At least I think it's c27. I found and soldered what I believe to be a replacement, but before I power the Teensy up I want to make sure I haven't made any mistakes, as well as have...
  8. H

    Questions about PROGMEM and Teensy 4.1

    This actually freezes the program entirely. It was giving me some troubles and realized I should have been using char and a pointer: PROGMEM char *modDst[] = {"none", "gate"}; The address produced from the code above is: 600019E0, which seems to check out. If it appears this is correct...
  9. H

    Questions about PROGMEM and Teensy 4.1

    Okay wonderful, so it looks then like I can just create one string array then? This prints to the Serial monitor, but I'm not sure how to check if it's held in program memory: const String modDst[] = {"none", "gate"};
  10. H

    Questions about PROGMEM and Teensy 4.1

    In this old forum post, Paul mentions that using the const keyword does the same thing as PROGMEM on the Teensy 3.0. Does it do the same for the 4.1? Is there anything inherent in actually using PROGMEM that will affect the program negatively? That could be my issue. I ran into an issue after...
  11. H

    Online C++ courses for hardware similar to MIDI controllers?

    Figured that it would be the best place to ask, but forgive me if this is an inappropriate post for this forum. Are there any recommended online courses in C++ that cover building controllers which perform complex functions, or something similar? Ideally for someone at the intermediate level...
  12. H

    Attempting to make an internal bpm/clock

    Hey luni, thanks for the help yet again! You're correct, I am using your library. Always happy to be able to present the problem to your solution :D Wow, thanks a ton I will be able to test this shortly and let you know the results. I actually had a question specifically about your library, so...
  13. H

    Attempting to make an internal bpm/clock

    Okay, now I see where the confusion was! The 24 steps in my code are meant to represent 24 parts per quarter note. I should have mentioned that before, whoops! My intention is that the LEDs advance a single step for every 24 ppq, the way I would expect a 24 ppq MIDI sequencer would. Ignoring...
  14. H

    Attempting to make an internal bpm/clock

    Hello, I'm attempting to make a sequencer with the bpm determined by the value of an encoder. Currently, the encoder is constrained to the values of 0 - 127, making a theoretical maximum 127 bpm. This is temporary, but may be contributing to the issue(?). The problem is that, based off of the...
  15. H

    Cheap quadrature encoder jumps values greatly when turned quickly

    Comment #19 from this thread was the answer that I needed. As the person said, it was as simple as removing the word "override" from EncoderButton.h. This is by far the best encoder code that I've come across, works like magic. Thanks Luni! Thanks Frank!
  16. H

    Cheap quadrature encoder jumps values greatly when turned quickly

    Thanks for going through the trouble to do that, Luni! I've installed the library, but the code is not compiling, and is giving me this error: In file included from /Users/coryoleson/Documents/Arduino/libraries/EncoderTool-master/src/EncoderBase.h:2:0, from...
  17. H

    Cheap quadrature encoder jumps values greatly when turned quickly

    :D Forgive me, time is not real at the moment. If it means anything, I did change the 'byte' part in the larger controller code, but referred back to this one since the code was mostly the same. Thanks for the tip!
  18. H

    Cheap quadrature encoder jumps values greatly when turned quickly

    Using only one knob from the "TwoKnobs Encoder Test" from the PJRC encoder library to read a cheap quadrature encoder that I picked up. Got help on this forum a few months ago to constrain the value to the 0 - 127 midi standard. Of all of the interrupt-based encoder sketches that I was able to...
  19. H

    Rotary encoder: Increment by 1 per 'click' while constraining values 0 - 127

    Amazing, that did it! Thank you. Would you mind telling me why I should not use byte? I've been using it due to someone's suggestion that I should declare my hardware variables as a byte because I'm saving to EEPROM.
  20. H

    Rotary encoder: Increment by 1 per 'click' while constraining values 0 - 127

    Using the example in the PJRC encoder library, I'm trying to constrain my encoder values between 0 - 127. There's conflict between how the encoder wants to increment and how the counter acts. Using the "TwoKnobs Example", with only one encoder, My rotary encoder wants to count by 4 with each...
  21. H

    Only SCL and SDA pins 18 and 19 work

    Interesting development, the FRAM library has two example codes. The one I've been using reads the first 256 addresses, while the second one (posted below) does the same thing but reads all of the addresses. When using the second example code, the problem mentioned above actually flips when...
  22. H

    Only SCL and SDA pins 18 and 19 work

    It appears to have worked, thanks Paul. Only now I'm having another issue related to FRAM but not i2c. Can start a new thread if needed. When testing on the Uno, I get the following reading, which is a successful read: When testing on the Teensy, I get the text in the box below sometimes...
  23. H

    Only SCL and SDA pins 18 and 19 work

    Trying to install an FRAM breakout board onto a 4.1. Running the test code in the Adafruit FRAM library linked below, the program returns a successful read when attached to pins 18 and 19. However, when attached to SDL/SCA 1 or 2 (understanding that SCL/SDA flip order on the board), the serial...
  24. H

    Wacky MIDI readings from a 4067 multiplexer, until a delay is applied.

    Thank you very much. Thank you for the link, it couldn't be any more direct than this snippet from the USBmidi page. // select 74HC4051 channel 5 (of 0 to 7) digitalWrite(1, HIGH); digitalWrite(2, LOW); digitalWrite(3, HIGH); // allow 50 us for signals to stablize...
  25. H

    Wacky MIDI readings from a 4067 multiplexer, until a delay is applied.

    That's very helpful, thank you. Looks like I'll have to get creative with loading values from EEPROM since only 12 of my 20 parameters seem to send MIDI messages when the 'load' button is hit. It's set so that all the addresses read from an array and send MIDI messages... all too quickly from...
  26. H

    Wacky MIDI readings from a 4067 multiplexer, until a delay is applied.

    Thanks again. Is there a better method than using a delay the way that I have? Your explanation might explain other problems I'm having sending MIDI too.
  27. H

    Wacky MIDI readings from a 4067 multiplexer, until a delay is applied.

    Hello, Currently using an HP4067 on a breakout board with 16 pots connected to a 4.1, sending MIDI over serial UART to another device, which allows me to see the MIDI readings on the computer. Using a modified version of the code I found, the reading from my pots look fine in the serial...
  28. H

    Basic question about returning to original array value

    Honestly, because I don't know how very many different commands work yet. If the option you're presenting uses less ram than a similar code using the method you've described, I wouldn't be opposed to doing it. Would you mind showing me a brief example of this?
  29. H

    Basic question about returning to original array value

    Found out what was wrong. In order for it to work, the 'load' command had to be triggered by an 'if(buttonPressed != lastButtonPressed)...' On top of that, you're absolutely right, now that I've spent a little more time with it, my if statements and bracket placements were madness. After...
  30. H

    Basic question about returning to original array value

    I've introduced the EEPROM to the code, which works great. However, now that I have the analogRead in there as well, the "potVal" (which will eventually become the MIDI CC value) will 'snap' back to the value located at the EEPROM address when I'm not turning my pot. In the old version of the...
  31. H

    Basic question about returning to original array value

    This is it! Oh my goodness, how perfect! Thank you thank you. Being a noob, I was unaware that commands could be entered from the serial monitor. Out of curiosity, what is the utility in the baud rate that you selected? I'm used to defaulting to 9600, and have only used it out of habit without...
  32. H

    Basic question about returning to original array value

    Darnit. Stuck again on the final part of this. You'll see from my code that I'm in the ballpark of what I'm trying to achieve (explained below), but the logic has to be a bit different. I will take a crack at it if you can point me to which sort of commands I should be using. Here's what I'm...
  33. H

    Basic question about returning to original array value

    Incredible. Thank you! I had to move the delay in my code down between the bottom two end curly brackets to make it work. Easy peasy. Still very very new to this :D. Love the people here.
  34. H

    Basic question about returning to original array value

    Whoops, just saw the rule about posting complete source code. Here it is: #include <EEPROM.h> const int buttonPin1 = 2; const int buttonPin2 = 3; int potPin[] = {A0, A1, A2}; int buttonState[3]; int lastButtonState[3]; int buttonState2[3]; int lastButtonState2[3]; int...
  35. H

    Basic question about returning to original array value

    Hello. I have an array of 3 values (10, 11, 12), that when I press a momentary button advances to (13, 14, 15) advancing each number by 3 with every button press. I would like the limit of my up counter to be (16, 17, 18), then, if momentary button is pressed again, it returns to (10, 11, 12)...
  36. H

    How to reset teensy 4.1?

    Question about a hardware solution to this, would it do any harm to the board if I were to attach a toggle to the 5v pin to reset it? Perhaps even a push-button?
  37. H

    Need help making Trellis send MIDI on/off messages

    Hello, I want to send MIDI on/off messages with the Trellis. According to those on the internet, it's super easy. I'm finding it hard. The code I'm using is the Trellis Test that comes in the Trellis library, with MIDI code copied from another basic Trellis library that doesn't work. The...
  38. H

    Teensy 4.1: Do I need to use a knife to sever a circuit for simultaneous power/usb?

    Hello, I've seen that the other teensy boards need to be cut in a certain place using an xacto knife in order to power the board and use USB at the same time. Is this the case for the Teensy 4.1, and where can I find the place to cut? Thank you!
  39. H

    Would I need an ADC if using pots with a i2c GPIO expander?

    I have realized the issue, and it is my naïveté. Somewhere in the middle of my original interaction with the person using the expander, they mentioned that they were using the MCP3208, which is (has?) a ADC converter. They suggested in the same sentence that I use an MCP23017, and in the...
  40. H

    Would I need an ADC if using pots with a i2c GPIO expander?

    Wonderful, thank you for your input, all. If this means anything, I'm building a midi controller for the Axoloti, which is essentially a synthesizer/music-ready microcontroller with its own software. Many people have hooked analog pots up to MCP230XX chips, which is why I may have seemed so set...
  41. H

    Would I need an ADC if using pots with a i2c GPIO expander?

    Oh I get it, because you would want to convert it to digital *before* the mcp23017. That makes more sense. I had thought that the chip could read analog signal. Thank you.
  42. H

    Would I need an ADC if using pots with a i2c GPIO expander?

    Hello, I'm looking to attach 16 10k pots to an MCP23017 i2c GPIO expander, and connect that to a Teensy 4.1. The i2c ports on the 4.1 are on the same pins as the analog pins. Would the i2c ports on the 4.1 automatically work as ADC converters, or would I need to get an additional ADC...
  43. H

    Hooking up a Teensy 4.1 to an Axoloti board. I have never worked with electronics.

    Hello! Some context: I recently discovered the incredibly versatile Axoloti board for music making. I'm obsessed with the possibilities available to me now. I was inspired after seeing peoples' DIY enclosures, and ambitiously decided that this would be my first ever electronics project. Of...
Back
Top