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

    Which Teensy are you using? Pete

    Which Teensy are you using?

    Pete
  2. It could also be a problem with the code. Post...

    It could also be a problem with the code. Post it.

    Pete
  3. No, like this: void setup() { } void loop(){...

    No, like this:

    void setup() {
    }
    void loop(){
    uint32_t start = ARM_DWT_CYCCNT;
    ....
    ....
    program
    ....
  4. Replies
    6
    Views
    219

    You then refer to the i'th element as Nom[i]....

    You then refer to the i'th element as Nom[i].
    Serial.println(Nom[2]) would print
    Lyon

    Pete
  5. Replies
    6
    Views
    219

    char...

    char *Nom[10]={"Paris","Marseille","Lyon","Rennes","Toulouse","Strasbourg","Grenoble","Lille","Nantes","Bordeaux"};

    or

    char...
  6. Replies
    15
    Views
    342

    Those are longer pins than the ones I thought you...

    Those are longer pins than the ones I thought you had used. They look good.

    Pete
  7. Replies
    15
    Views
    342

    When you solder the Teensy header on the bottom...

    When you solder the Teensy header on the bottom of the board, you will have used the shorter end of the header pin, which is then shortened even more by the solder. This will prevent the pins making...
  8. Replies
    12
    Views
    265

    I think this is the datasheet...

    I think this is the datasheet you need. See Figure 5 at the bottom of page 4.

    Pete
  9. Replies
    12
    Views
    265

    What you called a step-down transistor is a...

    What you called a step-down transistor is a voltage regulator. If you really are using a L7812CV, as shown in your diagram, it is the wrong one and would probably have burned out the T3.2 instantly....
  10. The default sample rate is 44100Hz. You can...

    The default sample rate is 44100Hz. You can change that rate at startup but I don't think you can change it on the fly and AFAIK you can only change it to a small range of frequencies (e.g. 8kHz,...
  11. Replies
    5
    Views
    189

    @ Beserker When you return the switch to the...

    @ Beserker
    When you return the switch to the neutral position, you will have just turned either the "left" (pin 0) or "right" (pin 1) side of the switch off. If you use the Bounce library, it is...
  12. I posted a (fairly) simple example of using...

    I posted a (fairly) simple example of using readBuffer/freeBuffer and getBuffer/Playbuffer here which might help you. It simply reads the stereo input (MIC or LINEIN) and plays it back to the...
  13. I vote for isodate too. Pete

    I vote for isodate too.

    Pete
  14. getBuffer returns NULL if a buffer isn't...

    getBuffer returns NULL if a buffer isn't available. Try this:

    int16_t *p = audio.getBuffer();

    if(p)audio.playBuffer();

    EDIT. AND you need to copy the samples...
  15. The AudioPlayQueue object is used to "play" 128...

    The AudioPlayQueue object is used to "play" 128 samples at a time.

    Pete
  16. Replies
    5
    Views
    189

    Use the bounce library to handle pins 0 and 1 and...

    Use the bounce library to handle pins 0 and 1 and wire them normally high with pinMode INPUT_PULLUP. When either of them goes low you handle that button "press". When either of them goes high, that...
  17. Have you tried any of the SD or SDFat examples?...

    Have you tried any of the SD or SDFat examples? Try the SD|listfiles example - you may have to set chipSelect to 10.

    Pete
  18. I tried your code on a T3.2 with an audio board....

    I tried your code on a T3.2 with an audio board. I had to remove your code which uses the display and use setMOSI and setSCK for the audio board, but your code has no problem finding the uSD card and...
  19. Actually, it might be that the release time is...

    Actually, it might be that the release time is too long. I looked at the waveform and the click/crackle might also be caused by the release time being interrupted by the next note on. In many of the...
  20. Increase the attack: try 50. Pete

    Increase the attack: try 50.

    Pete
  21. I've just realized that you also have the gains...

    I've just realized that you also have the gains of the first two inputs to mixer1 set to 1. The sum of the gains of the inputs to a mixer should be 1 unless you know that the inputs are attenuated....
  22. It appears to be a problem with optimizations....

    It appears to be a problem with optimizations. The default Optimize option of "Faster" uses -O2 and this produces the strange result, as does the smallest code which uses -On. Changing Optimize to...
  23. I suspect that you need a non-zero value for the...

    I suspect that you need a non-zero value for the envelope's attack. Try

    envelope1.attack(10);

    Pete
  24. A single-precision floating point multiply takes...

    A single-precision floating point multiply takes one instruction cycle. So once every 2 milliseconds, the 10 FP multiplications will take 17 nanoseconds.
    Right now, it's a waste of your time to be...
  25. You can only call receiveReadOnly once in an...

    You can only call receiveReadOnly once in an update. When you call it a second time, it will return NULL. This will cause your code to always return from the update function on the second call to...
  26. What are these sensors measuring? Pete

    What are these sensors measuring?

    Pete
  27. Moving the global variables to local (within a...

    Moving the global variables to local (within a function) has probably also moved the bug. It may still be clobbering memory but at the moment it is not clobbering something that is critical. It might...
  28. uint32_t might speed up your code a bit but lack...

    uint32_t might speed up your code a bit but lack of speed isn't your problem right now. It appears to be lack of space. Currently, the uint8_t arrays that you've shown in your message take up nearly...
  29. The symptoms suggest that you are running out of...

    The symptoms suggest that you are running out of memory or having a problem indexing outside an array.

    How many and how big? Are you using malloc or new to allocate them?
    It might be best to post...
  30. Or use printf. Instead of ...

    Or use printf. Instead of

    Serial.println("stuff");
    use

    Serial.printf("stuff\n");

    Pete
  31. I'd still like to see the code you are using to...

    I'd still like to see the code you are using to compute the time differences.

    Pete
  32. That "shouldn't happen", but how do you know it...

    That "shouldn't happen", but how do you know it is also triggering on the rising edge?
    Post some demo code.

    Pete
  33. FYI: Accessing GPIO6_PSR takes 10 cycles. Getting...

    FYI: Accessing GPIO6_PSR takes 10 cycles. Getting the same info from GPIO1_PSR takes up to 30 cycles - it varies from 27 to 30.

    Pete
  34. You could put together some pins for the second...

    You could put together some pins for the second 16 bits that would minimize the amount of bit manipulation that is required.
    On GPIO7 use bits 0-3 (pins 10,12,11,13), on GPIO9 use bits 4-8 (pins...
  35. I'm at home - here's a fix :) PIN GPIOn-BITm...

    I'm at home - here's a fix :)

    PIN GPIOn-BITm | GPIOn-BITm PIN

    ------------------|-------------------

    00 ->...
  36. @ vjmuzik A minor problem: GIPO in the right...

    @ vjmuzik
    A minor problem: GIPO in the right hand column should be GPIO.

    Pete
  37. Replies
    15
    Views
    439

    I think this bit of code at the beginning of...

    I think this bit of code at the beginning of main() is going to make life difficult, if not impossible, even on a T4.1

    int sample_rate = 12000;
    int num_samples = 15 * sample_rate;
    ...
  38. Replies
    15
    Views
    439

    You can use the setI2Sfreq function in this...

    You can use the setI2Sfreq function in this message: https://forum.pjrc.com/threads/60886-Teensyduino-1-52-Beta-6?p=239417&viewfull=1#post239417

    Pete
  39. Replies
    15
    Views
    439

    I had a look at decoding ft8 and ft4 on a teensy4...

    I had a look at decoding ft8 and ft4 on a teensy4 and concluded that there was wasn't enough memory. But I've had a look at the ft8_lib that you linked and it might fit on a T4.1. I've compiled it...
  40. While testing your code I realized that what...

    While testing your code I realized that what you've implemented is a half-wave rectifier. I had needed a full-wave rectifier and got confused. Sorry about that.
    However, if you are doing a half wave...
  41. @ boxxofrobots I don't see how your latest...

    @ boxxofrobots
    I don't see how your latest version is any better. The problem is that you are copying an int16_t into an int32_t and apparently assuming that the 16-bit integer is copied into the...
  42. There's a bug in the rectifier code. It appears...

    There's a bug in the rectifier code. It appears to work for all input values except 0x8000. In this case it should return 0x7fff (maximum positive value) but it returns 0x8000.
    I used a rectifier...
  43. I have one T3.5 which still has the original...

    I have one T3.5 which still has the original Blink sketch in it and it is recognized by Win 10 Pro x64 after the recent update. I can also program it.
    Does the LED on your T3.5 blink when power is...
  44. Replies
    6
    Views
    172

    In that case you don't need to set played = true...

    In that case you don't need to set played = true after every if statement. Set it once.

    Pete
  45. Replies
    6
    Views
    172

    Without seeing all your code it is hard to know...

    Without seeing all your code it is hard to know what is happening but *after* each if statement you set played = true. But this sets played to true whether or not you sent the note on and off. Each...
  46. Replies
    4
    Views
    150

    The AudioConnection class is in...

    The AudioConnection class is in hardware\teensy\avr\cores\teensy4\AudioStream.h

    Pete
  47. Replies
    9
    Views
    195

    Your code does not tell you how fast you are...

    Your code does not tell you how fast you are "getting values onto the PC". It is only measuring how long it takes Serial.println to buffer the characters and initiate the transfer.

    If you change...
  48. I can't test ethernet stuff right now but I found...

    I can't test ethernet stuff right now but I found this ssl client. One of the examples, ethernetHTTPS, compiles for T4.1. One compiler warning may be a problem:

    WARNING: library SSLClient-1.6.6...
  49. Replies
    8
    Views
    244

    No. The pinMode is INPUT_PULLUP. The PULLUP means...

    No. The pinMode is INPUT_PULLUP. The PULLUP means that if the button (*) is not pushed, the pullup will keep the pin HIGH. When the button is pushed (and it is wired correctly) it connects the pin to...
  50. Ignore. Took me too long to post the solution :)...

    Ignore. Took me too long to post the solution :)

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