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

    You could try something like the sensor strips...

    You could try something like the sensor strips that cities put on roads to measure the volume of traffic. I presume what they do is the weight of the wheel momentarily closes a circuit consisting of...
  2. Replies
    10
    Views
    629

    Can you try a fresh install of Arduino 1.8.19 and...

    Can you try a fresh install of Arduino 1.8.19 and the latest TD?

    Pete
  3. Replies
    16
    Views
    774

    What are Serial6 and Serial7 sending to? Each...

    What are Serial6 and Serial7 sending to? Each other (in a loop), another T4.1, a PC, ?

    Pete
  4. Replies
    10
    Views
    629

    AudioPlaySdWav' playWav1; // Play 44.1kHz 16-bit...

    AudioPlaySdWav' playWav1; // Play 44.1kHz 16-bit PCM greeting WAV file
    There should not be a single quote in that statement.

    If there are any other errors, post all your code (in code tags...
  5. Replies
    6
    Views
    379

    It is expecting you to pass a valid date and time...

    It is expecting you to pass a valid date and time . If you want to do arithmetic on the date, you have to do it yourself and make sure that the result is valid before passing it to settime. The best...
  6. Replies
    6
    Views
    379

    AHA. settime stores its arguments in a...

    AHA. settime stores its arguments in a tmElements_t structure and then calls maketime() to convert that structure to a time_t (number of seconds).
    BUT, all the elements of a tmElements_t structure...
  7. Replies
    6
    Views
    379

    The problem is, as you say, caused when the value...

    The problem is, as you say, caused when the value of minute() is zero and you therefore pass minus one as the value for the minute. I haven't figured out yet why that blows up the time library.
    ...
  8. Replies
    22
    Views
    1,630

    The answer to the first question is spot on and...

    The answer to the first question is spot on and the solution to the second one is trivial, given the answer to the first.
    But then it loses the plot at the third question. It reverts to planar...
  9. Replies
    22
    Views
    1,630

    Thanks for doing it :) Can you post a text...

    Thanks for doing it :)
    Can you post a text version of the C code? I don't think it is right, but I don't know Python that well.

    Pete
  10. Replies
    22
    Views
    1,630

    It's actually a multi-part thing that builds up...

    It's actually a multi-part thing that builds up to the big one. I'll have to type it up and I'll PM it. If anything interesting comes of it, you can post the results :)


    Pete
  11. Replies
    22
    Views
    1,630

    I have a problem I'm trying to solve and thought...

    I have a problem I'm trying to solve and thought it would be neat to see if it could even get close to an answer.
    But I don't need to know that badly.

    Pete
  12. Replies
    22
    Views
    1,630

    I was going to try it but in order to register...

    I was going to try it but in order to register they want name, email address (OKish, so far) and phone number (NOPE).
    They don't need my phone number.

    Pete
  13. Replies
    5
    Views
    269

    Your code compiled for me when I set the USB type...

    Your code compiled for me when I set the USB type to "Serial + MIDI + Audio".

    Sketch uses 116360 bytes (11%) of program storage space. Maximum is 1048576 bytes.
    Global variables use 175476 bytes...
  14. Replies
    3
    Views
    330

    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
  15. Replies
    16
    Views
    783

    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...
  16. Replies
    16
    Views
    783

    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],...
  17. Replies
    16
    Views
    783

    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
  18. 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...
  19. Replies
    4
    Views
    1,671

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

    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
  21. Replies
    7
    Views
    590

    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...
  22. Replies
    7
    Views
    590

    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:
    ...
  23. Replies
    7
    Views
    590

    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);
    ...
  24. Replies
    20
    Views
    2,041

    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...
  25. Replies
    20
    Views
    2,041

    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
  26. 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...
  27. 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...
  28. Replies
    3
    Views
    471

    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...
  29. 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...
  30. 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...
  31. Replies
    14
    Views
    689

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

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

    Pete
  32. 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...
  33. 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
  34. 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...
  35. 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...
  36. 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
  37. 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
  38. 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
  39. 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...
  40. 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...
  41. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    910

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

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

    Pete
  42. Replies
    11
    Views
    691

    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
  43. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    910

    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
  44. Replies
    4
    Views
    546

    What sort of filtering did you use? Pete

    What sort of filtering did you use?

    Pete
  45. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    910

    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
  46. Thread: I2C issues,

    by el_supremo
    Replies
    16
    Views
    910

    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
    // ...
  47. Replies
    5
    Views
    470

    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;
  48. Replies
    5
    Views
    470

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

    Post the code you used to test the CRC. Pete

    Post the code you used to test the CRC.

    Pete
  50. Replies
    18
    Views
    1,204

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

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

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