Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: el_supremo

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Yes, you're right. I was reading into your code...

    Yes, you're right. I was reading into your code something that wasn't there!

    Pete
  2. And another thing :) In the proof of concept,...

    And another thing :)
    In the proof of concept, when you fill the array in the loop function, that is happening so fast that, in effect, 'Width' is a constant. This means that all elements of OscArray...
  3. One quick observation. In both programs you have:...

    One quick observation. In both programs you have:

    for (int i = 0; i <= 256; i++){
    This should be

    for (int i = 0; i < 256; i++){
    otherwise when i=256 you'll write off the end of OscArray....
  4. Thanks for the photos. In photo #2 there's a...

    Thanks for the photos.
    In photo #2 there's a pair of yellow (HV) and blue (GND) wires. Where do they go? Are they the same yellow and blue wires that go to Teensy pins 18 and 19?

    Pete
  5. Post a photo of how you've connected the LCD to...

    Post a photo of how you've connected the LCD to pins 16 and 17.
    Does the LCD use 5V or 3V3?
    Does your LCD have pullups on SDA and SCL?

    Pete
  6. I wired a DS3231 to I2C port 1 on a Teensy4.1 and...

    I wired a DS3231 to I2C port 1 on a Teensy4.1 and ran the code from @BriComp's msg#4.
    It finds the device:

    I2C Scanner
    Scanning(Wire)...
    No I2C devices found

    Scanning(Wire1)...
    Device found...
  7. You are correct. Sorry. Your code should give...

    You are correct. Sorry.
    Your code should give you some audio.

    Pete
  8. A condenser mic needs power. The circuit diagram...

    A condenser mic needs power. The circuit diagram at the bottom of page 3 of the datasheet shows how to wire the power and a capacitor to the red lead. The specifications on page 1 give the typical...
  9. The WAV file probably gets played when the piezo...

    The WAV file probably gets played when the piezo isn't hit because the value read at the A0 and A1 pins is over the threshold value of 5.
    I ran this on a T3.6

    void loop(void)
    {
    ...
  10. What i2c bus rate are you using on NodeMcu? ...

    What i2c bus rate are you using on NodeMcu?

    Pete
  11. Replies
    6
    Views
    141

    At the beginning of the update function, I think...

    At the beginning of the update function, I think you should return if you can't allocate both blocks, otherwise you may try to work with NULL pointers later on in the function.

    if (new_left !=...
  12. Replies
    3
    Views
    121

    As Paul says, the photo is not clear enough to be...

    As Paul says, the photo is not clear enough to be sure of the connections. But the short red wire seems to connect the emitter of the 2N2222A to +12V instead of to ground.

    Pete
  13. The power on reset value will change once the...

    The power on reset value will change once the processor has performed a valid read of the temperature.
    I've been using a pullup of 3.3kohm on 3.3V Teensys.
    I've never had a DS18B20 fail on me but I...
  14. Replies
    9
    Views
    326

    Yup. The trick is figuring out how to safely...

    Yup. The trick is figuring out how to safely clean it up!

    Pete
  15. Replies
    9
    Views
    326

    Use device manager to look at your COM ports,...

    Use device manager to look at your COM ports, including hidden ones (View:Show Hidden Devices).

    Pete
  16. Replies
    9
    Views
    326

    I had lots of problems with duplicate COM ports...

    I had lots of problems with duplicate COM ports while I was using Win 7, but since I've switched to Win 10 Pro I haven't had any more trouble at all.
    When you are programming the three T3.5 boards,...
  17. Replies
    7
    Views
    267

    I modified your code to play three of the test...

    I modified your code to play three of the test WAV files and output audio to the headphones. It plays the first file completely. It plays the first second or so of the next file and goes to the third...
  18. Replies
    9
    Views
    326

    Which version of Windows are you using? Pete

    Which version of Windows are you using?

    Pete
  19. Can you post the code you are using? Pete

    Can you post the code you are using?

    Pete
  20. Replies
    3
    Views
    153

    Is this on Windows 10? Do you have any other...

    Is this on Windows 10?
    Do you have any other Teensys plugged in at the same time?

    Pete
  21. Replies
    3
    Views
    286

    The global variables used/declared in the...

    The global variables used/declared in the interrupt routine, must also be declared volatile.

    volatile static uint32_t timer1_openloop=0,loop=0;

    Pete
  22. Are you starting the SD card with code similar to...

    Are you starting the SD card with code similar to this?

    if (!SD.begin(BUILTIN_SDCARD)) {
    Serial.println("initialization failed!");
    while (1);
    }
    Serial.println("initialization...
  23. Replies
    2
    Views
    183

    You might also have to make the same change to...

    You might also have to make the same change to TWI_BUFFER_LENGTH in hardware/teensy/avr/libraries/Wire/utility/twi.h

    Pete
  24. Replies
    8
    Views
    425

    I didn't dig deep enough! Thanks Pete

    I didn't dig deep enough!
    Thanks

    Pete
  25. Replies
    8
    Views
    425

    I can't find Len's fix on github. Where is it? ...

    I can't find Len's fix on github. Where is it?

    Pete
  26. Replies
    8
    Views
    425

    I've attached a zip of my modified executable...

    I've attached a zip of my modified executable miditones.
    24742

    Pete
  27. Replies
    8
    Views
    425

    I've been meddling with the miditones code trying...

    I've been meddling with the miditones code trying to get the "-s2" option to work the way we both think it should and I think I've got it working. If you can compile your own version of miditones,...
  28. Minor correction. I was sending the left channel...

    Minor correction. I was sending the left channel of the reverb to left and right outputs. The last connection should be this:

    AudioConnection patchCordb(reverb, 1, i2s1, 1);

    Pete
  29. Replies
    4
    Views
    329

    I think it might be a problem with this: bool...

    I think it might be a problem with this:

    bool Button::wasPressed() {
    return debouncer->rose();
    }
    The problem is that wasPressed will return true whether this is the end of a short press or a...
  30. Demo code: T4.1 USB Host keyboard, Moog Ladder Filter, Flange, Plate Reverb

    Here's a demo sketch which uses a USB MIDI keyboard on a T4.1 USB host to play
    notes from the Moog Ladder Filter through the flanger effect and Plate Reverb.

    The platereverb library is included...
  31. Replies
    6
    Views
    321

    TimerEnd needs to be declared as volatile ...

    TimerEnd needs to be declared as volatile

    volatile byte TimerEnd;

    Pete
  32. Replies
    25
    Views
    1,152

    I also get odd behaviour from a Teensy LC. I...

    I also get odd behaviour from a Teensy LC.
    I tried the code on a T3.2 and a T4.1 and they both work all the time.

    Pete
  33. See my recent response in your other thread. Your...

    See my recent response in your other thread. Your oversampling loop in that thread is not the same as in this one.

    Pete
  34. Replies
    12
    Views
    598

    array_avg[countAVG] =...

    array_avg[countAVG] = (int16_t)((int)(array_avg[countAVG] + block->data[i+j])/2);
    This will only work if oversampling is 2.
    You should first accumulate the number of samples in array_avg[countAVG]...
  35. You could time how long the recording is and then...

    You could time how long the recording is and then use that to time the playback.

    Pete
  36. I connected the receiving T4.1 directly to...

    I connected the receiving T4.1 directly to Windows and sent MIDI Note On messages to it using MIDI_OX. It works, so the receiver code and T4.1 are fine.

    Pete
  37. I added a 5 second delay but it doesn't help. ...

    I added a 5 second delay but it doesn't help.

    Pete
  38. Ah. That's interesting. I tried a T3.6 as the...

    Ah. That's interesting. I tried a T3.6 as the receiver and it works.
    T4.1 still fails.


    Pete
  39. I've tried the code in #7 and it doesn't work for...

    I've tried the code in #7 and it doesn't work for me either. I've added code to flash the LED at startup in the receiver so that I know that it is at least powering up and that I'm using a data...
  40. Replies
    20
    Views
    758

    Excellent :) Pete

    Excellent :)

    Pete
  41. Replies
    20
    Views
    758

    I've been playing with your code on a T3.2 and it...

    I've been playing with your code on a T3.2 and it looks like it's not the output that's needed, it's the input.
    Add this before the declaration of AudioPlayQueue:

    AudioInputI2S i2s;
    ...
  42. Replies
    20
    Views
    758

    OK, remove the sgtl. I'm stuck. I'll keep...

    OK, remove the sgtl. I'm stuck. I'll keep pondering the problem.

    Pete
  43. Replies
    20
    Views
    758

    I think you may need to add this after the...

    I think you may need to add this after the audioConnection statement.

    AudioControlSGTL5000 sgtl5000;
    and in setup() add this:

    sgtl5000.enable();

    Without it there's nothing to cause...
  44. Replies
    20
    Views
    758

    Does this one digitalWrite (22, !digitalRead(22))...

    Does this one digitalWrite (22, !digitalRead(22)) in adc0_isr indicate that the interrupt is occurring at the correct rate?

    Pete
  45. Replies
    20
    Views
    758

    You have (at least) two problems. You are still...

    You have (at least) two problems.
    You are still copying only 128 of the 256 bytes in the audio buffer. Try this:

    memcpy(p, b, BUFFER_SIZE*2);
    or a more robust way of doing this is:

    ...
  46. Replies
    20
    Views
    758

    memcpy copies a number of bytes. The 128 int16...

    memcpy copies a number of bytes. The 128 int16 pointed to by getBuffer, is 256 bytes.

    You will probably have problems playing back the ADC data because the ADC only returns positive integers...
  47. Replies
    12
    Views
    598

    In your update(), you request a read-only block...

    In your update(), you request a read-only block but once you have accumulated 128 averaged samples in array_avg, you then copy that over the read_only block. Try receiveWritable instead of...
  48. Post your code (preferably in code tags - the #...

    Post your code (preferably in code tags - the # icon)
    You need to instantiate an ADC object:

    ADC *adc = new ADC(); // adc object

    and then refer to it as:

    ADC::Sync_result sr =...
  49. Replies
    11
    Views
    420

    Post a circuit diagram of how all those...

    Post a circuit diagram of how all those components are connected to the T4.1.

    Pete
  50. Replies
    11
    Views
    457

    This seems to avoid the drift. #include...

    This seems to avoid the drift.

    #include "TeensyTimerTool.h"
    using namespace TeensyTimerTool;

    PeriodicTimer myTimer;

    void printCurrentTime()
    {
    Serial.printf("Called at: %d\n", micros());
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4