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
    3
    Views
    142

    Have you run an I2C scanner to verify that the...

    Have you run an I2C scanner to verify that the device is being detected on address 0x29?

    Pete
  2. Replies
    16
    Views
    487

    Hmmm. The only thing I can think of is that it's...

    Hmmm. The only thing I can think of is that it's something to do with the SD file system not liking 512 files in a directory, but AFAIK it can take a lot more than that as long as they aren't in the...
  3. Replies
    16
    Views
    487

    String fname = "Pch" + String(k) + ".dat"; ...

    String fname = "Pch" + String(k) + ".dat";
    fname.toCharArray(filename, 13 + 4 + strlen(listOfSynthTypes[0]));
    snprintf(fullPathName, 23, "%s/%.2d/%s", listOfSynthTypes[0],...
  4. Replies
    16
    Views
    487

    patchFile.close(); patchFile.flush(); flush()...

    patchFile.close();
    patchFile.flush();
    flush() should go before close()

    [edit] But I don't think it'll make any difference. I'm pretty sure that close() implicitly does a flush() anyway.

    Pete
  5. I downloaded and converted that file to 44.1k....

    I downloaded and converted that file to 44.1k. The WavFilePlayer example plays it without any problems when it is the first thing being played.
    My guess is that there's a bug in your code. Can you...
  6. Replies
    4
    Views
    1,548

    I've just used the example in...

    I've just used the example in IRremote/ReceiveDemo with Teensyduino 1.57_b4 on a Teensy-LC. It works with a Sony remote. I'm using a Vishay TSOP variant of some sort - I forgot the exact part number...
  7. Replies
    7
    Views
    402

    I'm not familiar (nor competent) to advise about...

    I'm not familiar (nor competent) to advise about hooking up condenser mic to the audio board but the board was designed for connection of an electret mic. See MarkT's comment here.

    Pete
  8. Replies
    7
    Views
    402

    Sending the sine output to the fft would help...

    Sending the sine output to the fft would help debug things. Get that to produce good output from the FFT first.
    But your code in #5 should work with the mic.
    What kind of microphone are you using...
  9. Replies
    7
    Views
    402

    AudioConnection patchCord1(fft, adc1); This...

    AudioConnection patchCord1(fft, adc1);
    This isn't right. You are trying to send the FFT to the ADC. You should be sending the audio to the FFT.
    Change patchcord2 to send the sine to the fft:
    ...
  10. Replies
    7
    Views
    402

    You have to wait for there to be a result from...

    You have to wait for there to be a result from the fft before reading it. The delay is probably going to cause trouble too.
    Put these two in setup()

    sine1.frequency(500);
    ...
  11. Replies
    20
    Views
    1,582

    I compiled that code for a T4.1 using Arduino...

    I compiled that code for a T4.1 using Arduino 1.8.19 and Teensyduino 1.57_b4.
    There's an error because DataT is not declared. When I declare it as int, the code compiles - no complaint about missing...
  12. Replies
    20
    Views
    1,582

    Arduino 1.8.13 is rather old. Try Arduino 1.8.19....

    Arduino 1.8.13 is rather old. Try Arduino 1.8.19.

    Pete
  13. The Effects\Filter_FIR example consists of five...

    The Effects\Filter_FIR example consists of five files, one of which is filters.h
    If you have just copied the .ino file from that directory and called it sketch_FIR_002.ino, you need to copy the rest...
  14. I think you are mixing Arduino headers with...

    I think you are mixing Arduino headers with Teensy. Try using these for the header:

    #include <Arduino.h>
    //#include <i2c_driver.h>
    //#include <i2c_driver_wire.h>
    // audio stuff
    #include...
  15. Replies
    3
    Views
    316

    I don't why one works but the other doesn't,...

    I don't why one works but the other doesn't, however adding these statements fixes up the second version of the code:
    After the AudioConnections are set up add the statement:

    AudioControlSGTL5000...
  16. I think the problem is caused by the spaces in...

    I think the problem is caused by the spaces in the pathname. The name /mnt/c/Program Files (x86)/Arduino/hardware/tools/arm/bin/arm-none-eabi-gcc will be parsed as three strings.
    Try putting quotes...
  17. This might be the problem: sprintf (...

    This might be the problem:

    sprintf ( outgoingBytes , "s,%2.4f,%2.4f,%2.4f,%2.4f,e" , var1 , var2 , var3 , var4 ) ;
    The format specifiers aren't right. %2.4f means that the whole field is two...
  18. Replies
    14
    Views
    533

    I can't find a WAV file in that project. Pete

    I can't find a WAV file in that project.

    Pete
  19. You need to set the mode of the input pins too. ...

    You need to set the mode of the input pins too.


    // setup the input pins
    for(int i = 8; i <= 9; i++){
    pinMode(i, INPUT_PULLUP);
    }

    Do you have a resistor in series with the...
  20. The bitClear will fix the incoming parity issue....

    The bitClear will fix the incoming parity issue. You've implied that the parity bit is added to transmitted characters so you should be OK.

    Pete
  21. P.S. to clarify: that is why you don't match EOT....

    P.S. to clarify: that is why you don't match EOT. You are looking for 0x04, but it is received as 0x84. And you can match '3' because it is already even parity, but you can't match '2' because it is...
  22. The 8 bits you read are 7 bits of data and the...

    The 8 bits you read are 7 bits of data and the parity bit (in the high order position).
    The character '3' is hex 0x33 = 00110011. There are an even number of bits in the 7 data bits so the high...
  23. You aren't timing the Teensy. You are timing how...

    You aren't timing the Teensy. You are timing how long it takes to fetch the data from the ICM_20948 using I2C protocol.

    Pete
  24. Your code snippet doesn't include the code which...

    Your code snippet doesn't include the code which prints "20;2" which is where the problem is almost certain to lie. Post the code which prints this value.

    Pete
  25. Post some code which demonstrates the error(s)....

    Post some code which demonstrates the error(s). (Defragster beat me to it by 1 minute)

    Pete
  26. The setthetime funtion does not adjust the GPS...

    The setthetime funtion does not adjust the GPS time to local time. It sets the RTC to GPS time (UTC).
    When doing arithmetic on time values, such as adjusting the timezone, I find it best to use the...
  27. The return statements are preventing the code...

    The return statements are preventing the code doing anything at all.

    return (FlapsOBleft_pos, (0));
    should presumably be:

    FlapsOBleft_pos = 0;
    and the other return statements also...
  28. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    686

    De nada! And that has almost exhausted what I...

    De nada!
    And that has almost exhausted what I know of the Spanish language :)

    Pete
  29. Replies
    11
    Views
    561

    Can you check the output voltage of the...

    Can you check the output voltage of the smartphone charger with no load and then when it is connected to the T4? It may be producing more than 5V. Chargers aren't power supplies.

    Pete
  30. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    686

    In init_priv you need to change Wire.begin() to...

    In init_priv you need to change Wire.begin() to Wire2.begin().
    Also, remove Wire2.begin(0x27) from the setup function - it will be done by init_priv.

    Pete
  31. Replies
    4
    Views
    435

    What sort of filtering did you use? Pete

    What sort of filtering did you use?

    Pete
  32. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    686

    P.S. I also use the standard one-bus I2C scanner...

    P.S. I also use the standard one-bus I2C scanner and defined Wire to be Wire2. That also finds the ds3231 and the EEPROM.

    Pete
  33. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    686

    This code (don't remember where I found it) will...

    This code (don't remember where I found it) will scan for I2C devices on Wire, Wire1 and Wire2 on a T4.1.


    // i2c_scanner
    // http://playground.arduino.cc/Main/I2cScanner
    //
    // Version 1
    // ...
  34. Replies
    5
    Views
    356

    FastCRC and the website also agree when given the...

    FastCRC and the website also agree when given the input as a character string.

    /*
    FastCRC-Example
    (c) Frank Boesing 2014
    */

    #include <FastCRC.h>

    FastCRC8 CRC8;
  35. Replies
    5
    Views
    356

    You have to encode those 24 bits as 3 bytes - in...

    You have to encode those 24 bits as 3 bytes - in hex they are 0x64,0x29,0x22. This website gives 0x93 as the CRC8 of those three bytes.
    FastCRC agrees:

    /*
    FastCRC-Example
    (c) Frank Boesing...
  36. Replies
    5
    Views
    356

    Post the code you used to test the CRC. Pete

    Post the code you used to test the CRC.

    Pete
  37. Replies
    18
    Views
    1,021

    return (uint8_t) ((rawregvalue >> 20) +...

    return (uint8_t) ((rawregvalue >> 20) + (rawregvalue >> 16)) & 0x0f;
    Shouldn't that be & 0xff ?

    Pete
  38. I don't think that would be useful. Having an...

    I don't think that would be useful. Having an option of using sign-magnitude for the DHT22 is pointless and potentially confusing because it only uses twos-complement. Similarly, there's not much...
  39. I see one potential problem with your fix. The...

    I see one potential problem with your fix. The DHT21 might use sign-magnitude in which case you would need to split the DHT21 and DHT22 cases so that they handle the negative numbers correctly for...
  40. That should do it. Pete

    That should do it.

    Pete
  41. Replace the debug printf with this which will add...

    Replace the debug printf with this which will add my interpretation of the temperature (I hope - untested):

    Serial.printf("DEBUG: %02X %02X %02X %02X : %02X (%6.2f)\n",...
  42. What is the actual temperature? I'm suspicious...

    What is the actual temperature?

    I'm suspicious that the device actually represents the temperature as twos-complement, whereas both libraries treat it as sign-magnitude.
    If it is twos-complement,...
  43. Try this: DHT dht(DHTPIN, DHTTYPE, 27); and...

    Try this:

    DHT dht(DHTPIN, DHTTYPE, 27);

    and see my old thread about problems with the DHT22 on Teensy 3.

    If that doesn't help, let's try adding a debugging print in the library. Near the end...
  44. Can you try the Adafruit library - it's in the...

    Can you try the Adafruit library - it's in the Library Manager?

    Pete
  45. Which library are you using? The one I have (by...

    Which library are you using? The one I have (by Adafruit) does not have a read22() method.

    Pete
  46. Replies
    12
    Views
    819

    You are reading the RMS result thousands of times...

    You are reading the RMS result thousands of times a second even when it is not available. Try changing your loop function to this:

    void loop()
    {
    if(rms1.available()) {
    x = rms1.read();
    ...
  47. Replies
    12
    Views
    1,573

    I've not been able to find one for the M7 so I...

    I've not been able to find one for the M7 so I have presumed that the M4 info is a lower bound on the performance of the M7 :)

    Pete
  48. Replies
    12
    Views
    1,573

    This webpage...

    This webpage has a description of the FPU instructions and their timing. There's also a PDF version of the M4 DSP instructions.

    Pete
  49. I tried your code with an M-Audio keyboard which...

    I tried your code with an M-Audio keyboard which has a modwheel. No matter how much I roll the wheel and play chords and arpeggios, the total note count is always zero at the end.
    You didn't include...
  50. Replies
    10
    Views
    423

    Your code in #3 compiles for me with no errors....

    Your code in #3 compiles for me with no errors. But I am using Arduino 1.8.19, not 1.8.16, and Teensyduino 1.56.

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