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

    Post photos of the wiring. Pete

    Post photos of the wiring.

    Pete
  2. Replies
    18
    Views
    183

    You should have radio details on both screens...

    You should have radio details on both screens unless the RF24 library for the Mega is different than the T4.1.
    If it really does work for a few lines, i.e. the sender sometimes looks like this:

    ...
  3. Replies
    18
    Views
    183

    I'm using this code on both Teensys with slight...

    I'm using this code on both Teensys with slight modifications for the transmitter and receiver.

    I set both of them to start up as a receiver (role = 0) and then type T in one of them to get things...
  4. Replies
    18
    Views
    183

    Another problem is that Tx and Rx don't set the...

    Another problem is that Tx and Rx don't set the payload size. The default payload size is 32 bytes but the code is only sending 4 bytes.
    After the radio.begin() statement, add this line to both Tx...
  5. Replies
    18
    Views
    183

    I'm pretty sure the problem is that the Tx and Rx...

    I'm pretty sure the problem is that the Tx and Rx aren't using the same addresses.
    In both the Rx and Tx use this for the addresses:

    const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };...
  6. Replies
    18
    Views
    183

    Post the code you're using. Pete

    Post the code you're using.

    Pete
  7. Replies
    2
    Views
    51

    Post your code which tries to "attach it to a...

    Post your code which tries to "attach it to a mixer out" and explain how it fails.

    Pete
  8. Now it doesn't compile for me either. OK, let's...

    Now it doesn't compile for me either. OK, let's tackle this a different way. Unfortunately it requires editing several system files.
    Each of the serial devices for Teensy 4 (I presume that's what...
  9. That looks like a problem with the default...

    That looks like a problem with the default receive buffer size of 64 bytes (Tx default is 40). You can add extra receive and transmit buffer space to each Serial device.
    Declare these globally:
    ...
  10. Replies
    7
    Views
    105

    What is involved in resetting the heater? If you...

    What is involved in resetting the heater? If you just power it off and back on again, perhaps the Teensy could do that for you too. One of this sort of thing might work. I've never used one but looks...
  11. Replies
    2
    Views
    107

    I think it may be luck that your code works. ...

    I think it may be luck that your code works.

    This statement stores the address of ptr1, which is somewhere on the stack.

    ptrActive = &ptr1;

    I've changed the pointers a bit and this at least...
  12. Three shots from the hip: 1. The PPS (SQW) from...

    Three shots from the hip:
    1. The PPS (SQW) from the RTC doesn't appear to have a pullup resistor. It is required. You could specify the pinMode as INPUT_PULLUP to avoid having to add an external...
  13. Replies
    7
    Views
    194

    There is a possibility of array-overrun. ...

    There is a possibility of array-overrun.

    // Send PM data over radio
    float PM_10=(float)data.pm10_standard;
    sprintf(SendPM_10, "zc%04.02f&", PM_10);
    The problem is that specifying...
  14. Replies
    7
    Views
    194

    I've chopped your code down to just some of the...

    I've chopped your code down to just some of the stuff which writes to the SD files. I ran it on a T4.1 but that shouldn't make any difference to the result.
    It produces normal text without any...
  15. Replies
    7
    Views
    194

    The way to make sense of the data is to read the...

    The way to make sense of the data is to read the code and figure out why it isn't writing the ASCII text that you are expecting.

    Pete
  16. Replies
    7
    Views
    194

    Can you attach an example text file with the...

    Can you attach an example text file with the garbled data?

    I see that you have output to the Serial monitor. It would help to see that too.

    Pete
  17. The T4.0 is not 5V tolerant so you must have the...

    The T4.0 is not 5V tolerant so you must have the AS5047 board configured for 3V3 operation which involves feeding it the 3V3 supply from the T4.0 and setting the jumper at JP1 correctly.

    Pete
  18. Replies
    12
    Views
    197

    I think this is what you want but haven't tested...

    I think this is what you want but haven't tested it:

    AudioPlaySdWav arr_SdWav[6] = {
    &playSdWav1, &playSdWav2, &playSdWav3,
    &playSdWav4, &playSdWav5, &playSdWav6
    };
    .
    ....
  19. Replies
    12
    Views
    197

    When the [i] is inside a quoted string it has no...

    When the [i] is inside a quoted string it has no effect as an array.
    If the wav files are numbered 0.wav, ..., 5.wav you could do something like this:

    char *wavname[6] = {"0.wav","1.wav", ......
  20. Perhaps the fixes for 4.1 could be made with ...

    Perhaps the fixes for 4.1 could be made with

    #ifdef __MK66FX1M0__
    // T3.6 code
    #else
    // T4.1 code
    #endif

    Pete
  21. Hi John, This...

    Hi John,
    This was the transformer I'm using.

    Pete
  22. Here's two versions of my WWVB mod of the @DD4WH...

    Here's two versions of my WWVB mod of the @DD4WH DCF77 code.

    This version uses the microphone input which has an antenna connected to it, tuned for 60kHz reception.
    22368
    I used one of these...
  23. @jwestmoreland: I'm tidying up the code and...

    @jwestmoreland: I'm tidying up the code and should have it posted tomorrow. I've also cleaned out my PM inbox :o
    I have two versions of the code. The input for one is the same as the original DD4WH...
  24. The Wire library restricts the type of the...

    The Wire library restricts the type of the quantity in a requestFrom to be uint8_t which therefore has a maximum of 255. BUT the library further restricts this quantity to be no larger than the size...
  25. What's the file name? It has to be in 8.3 format....

    What's the file name? It has to be in 8.3 format.


    Serial.println(rawFile.available());
    I think this will crash the Teensy if there's no file because rawFile will be NULL.

    Pete
  26. Replies
    9
    Views
    208

    I don't see how there can be any effect. The two...

    I don't see how there can be any effect. The two formulae are identical (other than the variable name on the LHS) and, in either case, the result of the calculation isn't used anywhere so the...
  27. Replies
    2
    Views
    98

    Teensythreads contains a fair bit of assembler...

    Teensythreads contains a fair bit of assembler code which is specific to the ARM architecture whereas the Teensy++2 is an AVR.
    From the readme.md:


    Pete
    P.S. Defragster beat me to it :)
  28. Oooops. Thanks Kurt. I had been playing with a T4...

    Oooops. Thanks Kurt. I had been playing with a T4 and forgot to change the target board.

    Pete
  29. The default transmit buffer size for Serial4 is...

    The default transmit buffer size for Serial4 is 40 characters. When your code receives a message, it blasts out over 200 characters to Serial4. The code will hang until most of those characters have...
  30. Replace this: for (byte i = 0; i < 3; i++){...

    Replace this:

    for (byte i = 0; i < 3; i++){
    if (addr[i] > 15){ //RELEVANT SECTION
    addr[i] = 10 + i; //RELEVANT SECTION
    }
    }

    with...
  31. If you are writing to WAV files, it won't help...

    If you are writing to WAV files, it won't help writing 512 bytes at a time because what is getting in your way is the 44 byte WAV header which offsets everything you write.
    I have found a way around...
  32. 1) I think the memory requirement will be...

    1) I think the memory requirement will be determined primarily by how long the delays need to be and how much memory you allocate to the granular effects. That in turn will determine whether you need...
  33. Replies
    20
    Views
    530

    I've been playing with the filter and produced...

    I've been playing with the filter and produced this sketch which you might find useful.
    It generates a tonesweeep from 100-10000Hz over 5 seconds. The output of the sweep is fed to the queue so that...
  34. If mixer3 and mixer4 will only have one input in...

    If mixer3 and mixer4 will only have one input in the final design, they can be removed and the diagram simplifies to this:

    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>...
  35. Your diagram is essentially mono. To handle...

    Your diagram is essentially mono. To handle stereo you would need to have a separate path for each channel. Import this into the audio design tool:

    #include <Audio.h>
    #include <Wire.h>
    #include...
  36. Replies
    20
    Views
    530

    Fixing the m_buffer[-1] problem and changing...

    Fixing the m_buffer[-1] problem and changing floating point to fixed-point arithmetic won't make significant changes to the audio.
    There is something else that is having a more profound effect.
    One...
  37. Replies
    20
    Views
    530

    Try this: m_file.write((const char *)m_out,...

    Try this:

    m_file.write((const char *)m_out, AUDIO_BLOCK_SAMPLES * 2 * 2);

    And, you can also copy and paste error messages as text too.

    Pete
  38. Replies
    20
    Views
    530

    I missed (at least) one thing. The m_out array...

    I missed (at least) one thing. The m_out array also needs to be int16_t;

    int16_t m_out[AUDIO_BLOCK_SAMPLES * 2];

    Which Teensy are you using? (T3.2 ?)

    Pete
  39. Replies
    20
    Views
    530

    P.S. You can also speed up things by changing the...

    P.S. You can also speed up things by changing the floating point computations to use int16_t instead. We'll also handle that once the basic code works.

    Pete
  40. Replies
    20
    Views
    530

    uint8_t m_buffer[512]; That is...

    uint8_t m_buffer[512];
    That is your biggest problem. Samples are int16_t. When you calculate this:

    m_smooth = 0.985f * (m_smooth + m_buffer[k] - m_buffer[k - 1]) ;
    it is done...
  41. Replies
    20
    Views
    530

    Posting code as an image makes it extremely...

    Posting code as an image makes it extremely difficult to help you.
    Cut and paste it as text into your message, preferably within code tags (use the # icon).

    Have you tried the unmodified...
  42. Replies
    12
    Views
    385

    When using MIDI-OX, have you selected Teensy MIDI...

    When using MIDI-OX, have you selected Teensy MIDI in Options|MIDI devices. If you don't click on it to highlight it, MIDI-OX will ignore it.

    Pete
  43. Replies
    12
    Views
    385

    I made these changes #define btn0 2 #define...

    I made these changes

    #define btn0 2
    #define led0 LED_BUILTIN
    and your code works on a Teensy2 - I see the MIDI messages with Midi-Ox on my windows PC and also the messages to the Serial monitor....
  44. Which Teensy are you using? So, a maximum of...

    Which Teensy are you using?


    So, a maximum of 3200 bytes which would be no problem at all on a T3.x or T4.x and even on a Teensy 2 shouldn't cause problems.


    That makes no sense at all....
  45. The bug is in your code. The Audio library...

    The bug is in your code. The Audio library expects that when you play a buffer, you have allocated an audio object that will receive and process that buffer. All you are doing is allocating buffers...
  46. Replies
    40
    Views
    1,557

    When you print (or println) int16_t data, you...

    When you print (or println) int16_t data, you must always cast it as (uint16_t) to stop the implicit sign extension. E.g.

    Serial.println((uint16_t)plaintext[0], HEX);
    Then it will print this...
  47. Replies
    40
    Views
    1,557

    No they aren't. They are all 32-bits. The...

    No they aren't. They are all 32-bits. The difference is that all the numbers that begin with FFFF were negative and FFFF is the sign extension which occurs when a negative 16-bit number is converted...
  48. Replies
    4
    Views
    278

    Which Teensy and ethernet hardware are you using?...

    Which Teensy and ethernet hardware are you using?

    Pete
  49. Replies
    3
    Views
    243

    If I read the card correctly, that is the CAN bus...

    If I read the card correctly, that is the CAN bus Tx and Rx.

    Pete
  50. P.S. If the loopback on Serial2 works, you can...

    P.S. If the loopback on Serial2 works, you can change the JY901 code to use that port instead of Serial1.

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