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
    18
    Views
    394

    block->data[0] to block->data[3] is 8 bytes. Each...

    block->data[0] to block->data[3] is 8 bytes. Each audio sample is an int16_t not 32-bits.

    Pete
  2. Replies
    7
    Views
    269

    Teensy LC is a 3V3 device, Teensy 2 is a 5V...

    Teensy LC is a 3V3 device, Teensy 2 is a 5V device. Would the MIDI circuit need to be modified to handle the difference and did you do that?

    Pete
  3. Replies
    18
    Views
    394

    As I mentioned in #2, you are printing 44100...

    As I mentioned in #2, you are printing 44100 times per second which results in perhaps 176kB/s. The serial buffer is not huge and probably fills up quickly and then (I think) the Serial driver blocks...
  4. Replies
    18
    Views
    394

    Sounds like the Serial.prints in the update()...

    Sounds like the Serial.prints in the update() function are interfering with the output.
    Comment the four Serial.print statements and check the audio.

    Pete
  5. Replies
    3
    Views
    205

    See this thread...

    See this thread, especially Paul's answer in message 9.

    Pete
  6. Replies
    18
    Views
    394

    Two problems (I thiink). ...

    Two problems (I thiink).

    Serial.print(*sampleRect);
    1. sampleRect is declared as int32_t so you are trying to print the address of that variable, not its value/content.
    2. Doing a Serial.print...
  7. Replies
    5
    Views
    158

    Would using just two diodes in series drop the...

    Would using just two diodes in series drop the voltage from between 5V and 2V down to about 3.6V and 0.6V ?

    Pete
  8. Replies
    4
    Views
    175

    Yes, each of the .ino and .cpp files is compiled...

    Yes, each of the .ino and .cpp files is compiled separately, so that an #include only applies within that one file.

    Pete
  9. Replies
    4
    Views
    175

    At the top of the file, add this: #include...

    At the top of the file, add this:

    #include <Arduino.h>


    Pete
  10. AudioMemory is a macro. Adding EXTMEM on the...

    AudioMemory is a macro. Adding EXTMEM on the front doesn't change the macro at all.
    However, you can try changing the macro itself. In ...\hardware\teensy\avr\cores\teensy4\AudioStream.h at line 106...
  11. Replies
    27
    Views
    553

    I didn't think to try digitalToggleFast! But it...

    I didn't think to try digitalToggleFast! But it compiles to what I show in #6.

    Pete
  12. Replies
    27
    Views
    553

    The digitalToggle function doesn't compile down...

    The digitalToggle function doesn't compile down to a single STR like digitalWriteFast does but you can use this in its place:

    CORE_PIN0_PORTTOGGLE = CORE_PIN0_BITMASK;
    CORE_PIN0_PORTTOGGLE =...
  13. Replies
    27
    Views
    553

    In this message...

    In this message Paul says that digitalWriteFast compiles to a single STR instruction but that it can take two clock cycles to execute.
    @tonton81 may be right that toggling could be faster because,...
  14. Replies
    27
    Views
    553

    Each of those statements is compiled to a single...

    Each of those statements is compiled to a single assembler instruction so I don't think you can improve on it.
    Does it make any difference if you compile with Tools|Optimize: "Fastest" ?

    Pete
  15. Replies
    36
    Views
    476

    Hmmmm. The link in #28 is to...

    Hmmmm. The link in #28 is to https://forum.pjrc.com/attachment.php?attachmentid=21728 which shows the image to me.
    Try again:
    21739
    That seems to have attached in a different way but I used the...
  16. Replies
    36
    Views
    476

    @KurtE: Does the attachment in #28 work for you?...

    @KurtE: Does the attachment in #28 work for you?

    Pete
  17. Replies
    36
    Views
    476

    The rest of your wiring looks OK. I hooked up a...

    The rest of your wiring looks OK.
    I hooked up a T3.6 with several I2C devices, including the Chronodot. I tried two different I2C scanners and both find all 5 addresses on the bus using a range of...
  18. Replies
    36
    Views
    476

    Chandler obviously had problems including an...

    Chandler obviously had problems including an image in a message and has emailed me the photo. I've resized it (it was over 3MB) and include it here:
    21728

    Looks to me like you haven't got SDA and...
  19. Replies
    36
    Views
    476

    If the scanner doesn't find anything, can you...

    If the scanner doesn't find anything, can you post a photo that shows how things are wired?

    Pete
  20. Replies
    36
    Views
    476

    Maybe a picture will help. 21726 This shows a...

    Maybe a picture will help.
    21726
    This shows a T4.1 on a breadboard, but note that I haven't yet soldered it to the header pins (a teensy MUST be soldered to the header pins to work at all).
    The...
  21. Replies
    36
    Views
    476

    Have you tried using external pullups on SCL and...

    Have you tried using external pullups on SCL and SDA - about 2k2? The Adafruit board has 10k pullups which may not be sufficient.

    Pete
  22. I hadn't changed the clock - how would I do that?...

    I hadn't changed the clock - how would I do that?

    Pete
  23. WOW! It works! This is an FV chip which never...

    WOW! It works! This is an FV chip which never completed an erase before.

    PSRAM: 0 MB

    Enter 'y' in 6 seconds to format FlashChip - other to skip

    Erasing... (may take some time)
    ...
  24. Thanks. Pete

    Thanks.

    Pete
  25. @mjs513: which cpp file are you referring to? ...

    @mjs513: which cpp file are you referring to?

    Thanks
    Pete
  26. Replies
    8
    Views
    230

    I had been looking at the code for playSDRaw and...

    I had been looking at the code for playSDRaw and was wondering if it was handling interrupts properly but hadn't got around to actually doing anything about it. Specifically, I was wondering if it...
  27. What exactly do you mean by doesn't work? That...

    What exactly do you mean by doesn't work?
    That code (with the #define) runs fine for me on a T3.2 and a T4.0 (on Win 10 with Arduino 1.8.13 and TD 1.53).

    Pete
  28. Replies
    8
    Views
    230

    I haven't got the hardware to be able to play...

    I haven't got the hardware to be able to play around with the code so I can only suggest things to try to see if they make things better or worse.
    The thing I would try is to add a delay between...
  29. FWIW: I'm having the same problem with Winbond...

    FWIW: I'm having the same problem with Winbond 25Q128JVSQ on the T4.1 and also occasionally have had it happen on the T3.6. Can't figure out what's wrong. I'm hoping you come up with a solution!
    ...
  30. Replies
    8
    Views
    230

    Try adding playSdRaw1.stop()/playSdRaw.stop() in...

    Try adding playSdRaw1.stop()/playSdRaw.stop() in the appropriate places so that the currently playing object is stopped properly before being restarted.

    Pete
  31. I missed this: both windSpeedRotations and...

    I missed this: both windSpeedRotations and rainfallTipCount must be declared volatile if they are modified in an interrupt.

    Pete
  32. // RAINFALL INITIALIZE digital.pinMode(16,...

    // RAINFALL INITIALIZE
    digital.pinMode(16, INPUT_PULLDOWN, RISING); // Rainfall
    attachInterrupt(digitalPinToInterrupt(16), rainfallGetSample, RISING);

    // WIND SPEED INITIALIZE
    ...
  33. In what way does it fail? What happens in...

    In what way does it fail?


    What happens in this case?

    Post your code which uses the attachinterrupts.

    Pete
  34. Why? It will only take a microsecond or so longer...

    Why? It will only take a microsecond or so longer to "wait its turn" than a directly attached function.

    Pete
  35. Replies
    9
    Views
    424

    Like KurtE, I have also run into this but can't...

    Like KurtE, I have also run into this but can't remember which sketch or how I fixed it.

    But this compiles:
    velocity.h

    const static float VELOCITY[2][5] PROGMEM = {
    {1.0f, 1.0f, 1.00f,...
  36. Replies
    4
    Views
    265

    The Goldwave audio editor has a filter which it...

    The Goldwave audio editor has a filter which it just calls "Noise Reduction". To use it, you select a small segment of your audio file which contains only the noise and copy this to the clipboard....
  37. As far as I can see, there is no failure here. It...

    As far as I can see, there is no failure here. It is doing precisely what you're telling it to do, which is to spend more than 99.9% of the time repeatedly printing W on a line of its own. This...
  38. This statement isn't correct: ...

    This statement isn't correct:

    Serial.write("\nValue Read:\n",inByte);
    This form of Serial.write requires the address of a buffer as the first argument and the length of that buffer as the...
  39. Justa sec. How are you testing this? ...

    Justa sec. How are you testing this?

    inByte = Serial.read();
    Serial.write("\nValue Read:\n",inByte);
    If your Teensy is reading data from the PC's COM3, the string that you write back...
  40. Use CreateFileA. This is probably why you...

    Use CreateFileA.

    This is probably why you don't see anything when it establishes the connection:


    int SerialBuffer = 0;
    int BytesWritten = 0;
    SerialBuffer = 123;
    Status...
  41. Replies
    5
    Views
    266

    Correct. There's nothing wrong with the...

    Correct.

    There's nothing wrong with the "while". If there are no characters in the Serial2 buffer then the while is bypassed. The if statement does two things. First, the "gps.encode(c)" passes...
  42. Replies
    4
    Views
    139

    I presume that you're using PlaySDWav in which...

    I presume that you're using PlaySDWav in which case the audio design documentation for that says "Only 16 bit PCM, 44100 Hz WAV files are supported".

    Pete
  43. Replies
    4
    Views
    139

    What are you using to play the wav files? If new...

    What are you using to play the wav files?
    If new wav files don't work, maybe they have the wrong sample rate, etc.

    Pete
  44. I presume that you want to have the variable...

    I presume that you want to have the variable "previous_count" hold the value before the count went to zero.
    In which case, this code

    count = FreqCount.read();
    count =count*1000;
    previous_count...
  45. If the plotter works in the same way as the...

    If the plotter works in the same way as the Serial Monitor and you only type the 'g', it won't be sent. You have to hit Enter as well.

    Pete
  46. The example in msg #2 uses SoftwareSerial on pins...

    The example in msg #2 uses SoftwareSerial on pins 3 and 4 at 4800 baud instead of Serial1 on pins 0 and 1 at 9600 baud.
    Try this code which reads the raw GPS output at 9600 baud on Serial1. It works...
  47. Your sample code in msg #4 is not the same as the...

    Your sample code in msg #4 is not the same as the snippet in #1.

    p = strstr("Test String", "str");
    will return NULL because "str" does not occur in "Test String".
    Your tests in #4 all use "Test...
  48. Replies
    5
    Views
    194

    Which Teensy are you using? Pete

    Which Teensy are you using?

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

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

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

    No, like this:

    void setup() {
    }
    void loop(){
    uint32_t start = ARM_DWT_CYCCNT;
    ....
    ....
    program
    ....
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4