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.02 seconds.

  1. 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...
  2. Replies
    2
    Views
    76

    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
  3. Replies
    8
    Views
    204

    I didn't dig deep enough! Thanks Pete

    I didn't dig deep enough!
    Thanks

    Pete
  4. Replies
    8
    Views
    204

    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
  5. Replies
    8
    Views
    204

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

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

    Pete
  6. Replies
    8
    Views
    204

    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,...
  7. 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
  8. Replies
    4
    Views
    178

    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...
  9. 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...
  10. Replies
    6
    Views
    177

    TimerEnd needs to be declared as volatile ...

    TimerEnd needs to be declared as volatile

    volatile byte TimerEnd;

    Pete
  11. 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
  12. 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
  13. Replies
    12
    Views
    342

    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]...
  14. 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
  15. 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
  16. I added a 5 second delay but it doesn't help. ...

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

    Pete
  17. 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
  18. 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...
  19. Replies
    20
    Views
    405

    Excellent :) Pete

    Excellent :)

    Pete
  20. Replies
    20
    Views
    405

    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;
    ...
  21. Replies
    20
    Views
    405

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

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

    Pete
  22. Replies
    20
    Views
    405

    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...
  23. Replies
    20
    Views
    405

    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
  24. Replies
    20
    Views
    405

    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:

    ...
  25. Replies
    20
    Views
    405

    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...
  26. Replies
    12
    Views
    342

    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...
  27. 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 =...
  28. Replies
    11
    Views
    249

    Post a circuit diagram of how all those...

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

    Pete
  29. Replies
    11
    Views
    252

    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());
  30. Replies
    11
    Views
    252

    You shouldn't reset the timer register. Let the...

    You shouldn't reset the timer register. Let the library take care of the details.

    // GPT1_OCR1=2400000;
    It will still drift but nowhere near as fast as before.

    Pete
  31. Replies
    1
    Views
    91

    One million won't fit into a 16-bit unsigned...

    One million won't fit into a 16-bit unsigned integer.

    Copying the text of the message and pasting it in your message is a lot easier than an image.

    Pete
  32. Replies
    6
    Views
    181

    The interrupt for the timer is turned off until...

    The interrupt for the timer is turned off until the ISR returns. The delay stops the ISR from returning.
    An ISR should always be written to be as fast as reasonably possible. Putting a delay in an...
  33. Did you use the name plateRvbStero1 in the .cpp...

    Did you use the name plateRvbStero1 in the .cpp file, but plateRvbStereo1 in the other?

    Pete
  34. Replies
    7
    Views
    222

    You're very welcome. Pete

    You're very welcome.

    Pete
  35. Replies
    7
    Views
    964

    This link...

    This link from the prop shield page worked for me.

    Pete
  36. Replies
    7
    Views
    222

    Aha. Change square.begin(WAVEFORM_SQUARE); to ...

    Aha. Change square.begin(WAVEFORM_SQUARE); to square.begin(WAVEFORM_PULSE); which also generates +1 and -1 and therefore needs shaping. But then you can use pulseWidth to get whatever duty cycle...
  37. Replies
    7
    Views
    222

    Sorry, I misread your EDIT comment. The output...

    Sorry, I misread your EDIT comment.

    The output of the square waveform does not alternate between zero and one. It is +1 or -1. All that does to your signal is periodically invert it.
    One way to...
  38. Replies
    7
    Views
    222

    To use both DACs on the T3.6 you need to use...

    To use both DACs on the T3.6 you need to use AudioOutputAnalogStereo

    AudioOutputAnalogStereo dacs;
    and then in the connections reference port 0 (left) and port 1 (right)

    AudioConnection ...
  39. Are the yellow and green wires soldered on to the...

    Are the yellow and green wires soldered on to the board at the right? It looks like they are jumper wires whose pins might just be pushed into the holes in the board.

    Pete
  40. Call handle_Messages from the loop() function and...

    Call handle_Messages from the loop() function and try increasing the heartbeatInterval_RX as I mentioned in #2. When the messages are occurring one every 250ms, there's no need for the receive...
  41. I don't think this is correct - i.e. it is not...

    I don't think this is correct - i.e. it is not interrupt driven. You have to arrange your code such that it calls handle_Messages more frequently than the heartbeat timeout, which is ten...
  42. I would guess that runningLeds is calculating an...

    I would guess that runningLeds is calculating an invalid value for the index 'cled' into the ledfunctions array. This calculation:

    int tled=st-ct;
    float pled=tled/float(st);
    boils down to...
  43. Are you using the Rev D audio board? Post a...

    Are you using the Rev D audio board?
    Post a photo which clearly shows the audio board and T4.1 connected together.
    The audio library works with T4.1

    Pete
  44. FYI: v2.2.3 also works on T4.1 Pete

    FYI: v2.2.3 also works on T4.1

    Pete
  45. The default version of irremote (v2.2.3), which...

    The default version of irremote (v2.2.3), which is in the Teensy distribution, works on both T2.0 and T3.2 with a TSSP4038 on Pin 2.
    I removed the local version (teensy/libraries/irremote) so that...
  46. Your code works on a Teensy 2.0 but not on a...

    Your code works on a Teensy 2.0 but not on a Teensy 3.2. It dies when the library's enableIRIn function re-enables interrupts after setting up a timer.

    Pete
  47. Pin 13 is the output LED on the T3.2 and doesn't...

    Pin 13 is the output LED on the T3.2 and doesn't behave quite the same as an ordinary digital input pin. Try using RECV_PIN on pin 14.

    BTW. Which IR receiver are you using?

    Pete
  48. Replies
    11
    Views
    486

    Hi Kevin, This is just a wild guess, but try...

    Hi Kevin,
    This is just a wild guess, but try moving one of the ADC to pin 38 (A14). I think it is on the other ADC. Perhaps the library can handle two ADCs on T4.1 if one is on ADC1 and the other on...
  49. Replies
    11
    Views
    486

    The audio design GUI says that AudioInputAnalog...

    The audio design GUI says that AudioInputAnalog for T4.0 and T4.1 is "experimental". Perhaps you are stretching things a bit too far? I'm afraid I haven't used it.

    Pete
  50. Replies
    11
    Views
    486

    I knew there was something special about...

    I knew there was something special about AudioInputAnalogStereo. It is only defined for Teensy 3.2, 3.5 and 3.6.

    You'll have to use two separate AudioInputAnalog as input to the mixer.

    Pete
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4