Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: mlu

Page 1 of 6 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    3
    Views
    300

    I can spot what looks like two issues with then...

    I can spot what looks like two issues with then code:

    First there is an extra 'period' delay when restarting the timer before the restarted timer expires and calls 'sinewave' function, so one...
  2. The following code compiles, not tested with midi...

    The following code compiles, not tested with midi



    #include <MIDI.h>

    MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);

    void setup() {
    MIDI.begin();
  3. Use the hardware event capture timing libraries ...

    Use the hardware event capture timing libraries FreqMeasureMulti. The hardware will capture the timer values at the same bus cycle as the pin goes high, or perhaps after a filter delay of 3 clocks,...
  4. If the interpolation is a linear function of the...

    If the interpolation is a linear function of the measured values you can do any interpolation after the cross correlation with same results, try to simply fit a quadratic to the maximum of the cross...
  5. Usually low noise readings results from clean...

    Usually low noise readings results from clean power supply with good filtering, separation of analog power and ground from the digital domain, correct cabling and signal routing combined with stable...
  6. #define PRETRIGSAMPLES 30 for...

    #define PRETRIGSAMPLES 30



    for (row=0; row <PRETRIGSAMPLES; row++)
    {
    int micRow = (row+ndex)%PRETRIGSAMPLES;
    sendMics[row][0]=mic1[micRow];
    ...
  7. The audio library will keep adding more filled...

    The audio library will keep adding more filled audio buffers to the queues even if they have not been processed, so there is some automatic buffering.
  8. Well at the moment I would suggest you get this...

    Well at the moment I would suggest you get this code with 129 samples working cleanly, if for no other reason so you understand the mechanics.

    Then polish this code to remove as much unnecessary...
  9. Sorry missed those, they go in the if (filling)...

    Sorry missed those, they go in the if (filling) block



    if (filling)
    {
    sendMics[sendex][0]=sig1;
    sendMics[sendex][1]=sig2;
    sendMics[sendex][2]=sig3;
    ...
  10. Replies
    2
    Views
    697

    you can use 12 note names and then one digit for...

    you can use 12 note names and then one digit for the octave.

    note = midinote%12;
    octave = midnote/12;
  11. I dont have the hardware to test, but the...

    I dont have the hardware to test, but the following code compiles at least, and hopefully the logic is easy to follow:



    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>


    // GUItool:...
  12. I think you should return to the previous code,...

    I think you should return to the previous code, just dont free any queue's until you have read 128 entries from the blocks of data that the spot's points to.
    memcpy copies bytes, and you have arrays...
  13. I am not an expert with the audio library, but I...

    I am not an expert with the audio library, but I would expect the data to arrive in chunks of 128 samples to the queues, because the library processes sound data in 128 sample blocks, and therefore...
  14. Replies
    8
    Views
    1,446

    The overflow of microseconds wont work: if...

    The overflow of microseconds wont work:



    if (microseconds>microseconds_last) elapsed_microseconds = microseconds-microseconds_last;
    else elapsed_microseconds = (0xFFFFFFFF + microseconds_last...
  15. Replies
    5
    Views
    1,159

    The Teensy 3.x dont use any external capacitors...

    The Teensy 3.x dont use any external capacitors for the 16MHz crystal, there are configurable internal capacitors inside the chip.
  16. Replies
    8
    Views
    1,654

    Looks like no code problem, but the capacitative...

    Looks like no code problem, but the capacitative load on the output is large in relation to the switching speed and the current pin drive current.
  17. After a fast look through the code, it seems that...

    After a fast look through the code, it seems that ndex/sendex is increased when queue10 has been read without really checking or remembering anything about the states of the other queues. If the...
  18. The RC type Pulse control has an update interval...

    The RC type Pulse control has an update interval of typically 20ms, if this is sent from your controller to a robot controller, and the robot controller then outputs the same type of signals to a...
  19. The 17 int limit corresponds surprisingly close...

    The 17 int limit corresponds surprisingly close to just over the 64 byte size of the serial transmission buffers. This creates the risk that the rxbuffer is overrun while the ETout is sending data.
    ...
  20. You could try to define the startup hook as...

    You could try to define the startup hook as extern "C" to avoid C++ name mangling.



    extern "C" void startup_late_hook(void) {
    delayMicroseconds(100000);
    delayMicroseconds(100000);
    ...
  21. Replies
    3
    Views
    1,019

    The reason why the code works on UNO and not on...

    The reason why the code works on UNO and not on Teensy could be that Serial.println(aneoRevs) in the interrupt handler will take only a few microseconds using the USB Serial on Teensy, but on UNO...
  22. Check the following discussion: ...

    Check the following discussion:

    https://github.com/FastLED/FastLED/issues/368
  23. So it seems that CRC is not the problem, the...

    So it seems that CRC is not the problem, the packet is cut off before reading all the incoming message.
    The problem could be that for every loop you only read one single char, and the...
  24. Replies
    12
    Views
    1,391

    Try adding : Serial.print("speed:");...

    Try adding :



    Serial.print("speed:");
    Serial.println(speed);


    So you can see what output comes from where, and then some extra print close to the a=0 :
  25. Replies
    12
    Views
    1,391

    The problem is that after reading a speed value...

    The problem is that after reading a speed value with Serial.parseInt() , in the next loop the end of line character is parsed as speed 0, after a timeout in parseInt(), and the output is turned off...
  26. Replies
    12
    Views
    1,391

    Turning off the interrupts will stop USB Serial...

    Turning off the interrupts will stop USB Serial and the timer functions like delay from working.
  27. Replies
    12
    Views
    2,516

    Seems to be an alignment problem, FastLED library...

    Seems to be an alignment problem, FastLED library reads gradient palette information in dword chunks.


    __attribute__ ((aligned (4))) DEFINE_GRADIENT_PALETTE( heatmap_gp ) {

    This keeps the...
  28. Replies
    9
    Views
    3,218

    Serial.printf(":%02d",digits)

    Serial.printf(":%02d",digits)
  29. Transmitting 17 characters at 115200 takes around...

    Transmitting 17 characters at 115200 takes around 1500 ms ( 9ms/bit*10 bits/char (with start and stop)*17 ), from the sender to the transmitting XBEE, then at least that long time over the radios,...
  30. Replies
    5
    Views
    965

    Problem is that LOW and HIGH are not pointers,...

    Problem is that LOW and HIGH are not pointers, they are macros evaluating to integer values
  31. Replies
    5
    Views
    965

    The code you have published is not enough to...

    The code you have published is not enough to compile and test what could be wrong, but:

    Your handling of references and pointers will not work, you are using * when you should be using & to get a...
  32. USB MIDI supports up to 16 logical jacks/cables...

    USB MIDI supports up to 16 logical jacks/cables for every USB MIDI endpoint, that would give 16 cables * 16 channels * 127 Notes.

    This is not implemented in the current library, would need to add...
  33. DMA on both sender and receiver, after a...

    DMA on both sender and receiver, after a preliminary handshake to start the transfer ?
  34. Replies
    13
    Views
    2,692

    I would try 330 ohm, if you have 3.3V this gives...

    I would try 330 ohm, if you have 3.3V this gives a short circuit of 10mA, should be perfectly safe.
    How well this works depends a bit on the resistor value in the pedal.
  35. Replies
    13
    Views
    2,692

    When connecting and disconnecting the TSR plug,...

    When connecting and disconnecting the TSR plug, there can be a momentary short between then AGND on the sleeve of the female connector and the +5V on the ring of the female. This is normally just a...
  36. The MacOS can mess up the serial USB connection...

    The MacOS can mess up the serial USB connection if it goes into sleep/powersave while the connection is active.
    I have seen it with several different USB serial connections, like Teensy USB but also...
  37. 9600 baud is 9600 Hz bit rate, same with 115,200...

    9600 baud is 9600 Hz bit rate, same with 115,200 baud, it is 115.2 kHz bitrate and around 11.5 kilo byte per second
  38. Replies
    24
    Views
    3,836

    The UART/SUART switch is on your XBEE board is...

    The UART/SUART switch is on your XBEE board is connected to 20/A6 and 21/A7. So if the switch is in SUART position then weird things might happen.
  39. Thread: code hanging

    by mlu
    Replies
    12
    Views
    2,418

    I assume that 'stat' is defined, so all the...

    I assume that 'stat' is defined, so all the #ifdef stat stuff is simply always true

    Its not simply a function calling another function ...

    there are a couple of calls to some unknown msgin and...
  40. Thread: FTM Timer issue

    by mlu
    Replies
    5
    Views
    2,172

    Try clearing all status flags FTM0->STATUS in...

    Try clearing all status flags FTM0->STATUS in your initialisation code void Timer_FTM0_Init(void).
  41. Replies
    10
    Views
    2,124

    The clock cycles stated in #1 does not take into...

    The clock cycles stated in #1 does not take into account that the DAC uses the bus clock that runs at 60MHz, exactly how many cycles the CPU will stall on the writes to DAC is not easy to predict,...
  42. Replies
    12
    Views
    1,692

    Serial is the USB serial, the UART port connected...

    Serial is the USB serial, the UART port connected to pins 0 and 1 is Serial1.
    So probably you should use

    Serial1.begin(31250);
    to initialize the MIDI serial port baudrate.
  43. Replies
    15
    Views
    1,942

    Your code is quite busy, quite a number of analog...

    Your code is quite busy, quite a number of analog reads, neopixel ring updates, Serial writes and display writes and then the sound generation running in the loop. If it really is that lcd via I2C...
  44. Without checking feasibility or how this could be...

    Without checking feasibility or how this could be implemented I would look for the the following:

    A two layer DMA with a 4 sample inner loop and a 512 count outer loop for a total of 2048...
  45. Replies
    15
    Views
    1,942

    This is a bit hard to interpret: with the SDA...

    This is a bit hard to interpret:
    with the SDA connected
    * are midi data received
    * are the sound processed
    * is it not output
    * is the display responding

    With SDA disconnected
    * do you...
  46. Replies
    10
    Views
    2,743

    It could be that the constructors for all these...

    It could be that the constructors for all these 127 String variables in the array uses up to much heap space, these constructors are automatically called when string array is created with...
  47. Replies
    21
    Views
    4,909

    Getting down to the ground on Teensy 3 in order...

    Getting down to the ground on Teensy 3 in order to learn how to handle PSoC devices, I dont think that will work so well.
    If it is a PSoC 5LP or a 4M then they use a CortexM3 / M0 processor that is...
  48. Replies
    38
    Views
    8,533

    So you do not only power the Teensy, but you...

    So you do not only power the Teensy, but you power the Teensy and some power hungry LED displays from the same supply, 12 to 5V converter.
    I would suggest you try to power Teensy and LED displays...
  49. Replies
    3
    Views
    974

    From the FreqMeasure library page : Input pin...

    From the FreqMeasure library page :

    Input pin on Teensy 3.0/3.1/3.2 is pin 3.
  50. Replies
    32
    Views
    9,088

    The input pin interrupts are synchronized to the...

    The input pin interrupts are synchronized to the bus clock so even if the processor is running at 180MHz you will not get better than 16.7nS resolution (1000/60MHz), the same goes for reading the...
Results 1 to 50 of 294
Page 1 of 6 1 2 3 4