Search results

  1. Y

    Teensy 3.6/4.0/4.1, USBHost_t36, Reading and Writing Files

    I don’t know if this is still relevant. But I hade luck with this simple code (to Write a file). I dont use "firstPartition.begin" #include <USBHost_t36.h> // Setup USBHost_t36 and as many HUB ports as needed. USBHost myusb; USBHub hub1(myusb); // Instances for one drive USBDrive...
  2. Y

    Interrupts while recording not working (Teensy 4.1 and audio bard with Accelerometer)

    I have now made some test. The problem seems to be when writing wo files. I changed the size of the bufferwriteout, and I track how often data is written to the sd card. Now you can clearly see that the problem is when the buffer is written. Is seams that when the buffer is written the code...
  3. Y

    Interrupts while recording not working (Teensy 4.1 and audio bard with Accelerometer)

    No, the buffer is not full. The Code saves the max bytes in the buffer. With all my test it was always (way) below 600. Therefore this should not be the bottleneck. There is another file write. But is the second file from the audio recording. I can try and write bigger chucks. I suspect that...
  4. Y

    Interrupts while recording not working (Teensy 4.1 and audio bard with Accelerometer)

    Thanks @defragster I have found and used this example. I have now implemented the buffer. But sadly this does not make a difference. Still when recording the timing is all over the place. (When I am not recording the minings are way better) Example where it schould be ervery 1000us: What I...
  5. Y

    Interrupts while recording not working (Teensy 4.1 and audio bard with Accelerometer)

    Writing with a buffer is not so easy. I was not really able to find any good solutions, I have to dig deeper. What I have read is that SdFat manages it own buffer, therefore I am not sure what adding another world benefit. What I should mention is that I would need to record for multiple hours...
  6. Y

    Interrupts while recording not working (Teensy 4.1 and audio bard with Accelerometer)

    I have changed the code so that I use both SD Cards. But with also no luck. I have not jet figured out how to use a buffer. For what I have read the new SD.h already uses sdfs, and this one is already using a buffer. If someone has some hints that would be helpful. Here my code: #include...
  7. Y

    Interrupts while recording not working (Teensy 4.1 and audio bard with Accelerometer)

    Thanks for the sugestions I will try to use a buffer. What I find interesting is that everything is working without delays when I am not recording? Maye with the Recording it is to much for the SD Card to handle? I will try it.
  8. Y

    Interrupts while recording not working (Teensy 4.1 and audio bard with Accelerometer)

    I have found now I way to register the switch. It is a bit ugly but I can’t find anything better. But the problem is only occurring when I want to read data from the sensor and record at the same time. Each of them alone works perfectly. The following code manages to do both but far from good...
  9. Y

    Interrupts while recording not working (Teensy 4.1 and audio bard with Accelerometer)

    Hello I am trying to use a Accelerometer while recording audio. But I have a problem with interrupts. First of all, there are multiple ways to check if new data is available for the Accelerometer (check te register or use DRDY PIN. Goes on hi if Data is ready. I found that using the Pin is...
  10. Y

    Teensy 4.1 with Audio Adaptor only noise when recoding but playback is working

    Hello I think I have found a solution. I think it is not possible to record audio via the 3.5mm jack. I have tried it now via the MIX and GND Pins on the board and with that it works fine. Is there a way to record audio via the 3.5mm jack? Thanks
  11. Y

    Teensy 4.1 with Audio Adaptor only noise when recoding but playback is working

    Hello Im want to record some audio with the teensy 4.1. But I am unable. I only get noise, regardless of what I am trying. But playback is no problem. But I have to use ti SD Card on the teensy otherwise there is extreme noise. I have just adjusted the example code to use the other SD Card. I...
Back
Top