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

Search:

Type: Posts; User: mlu

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    185

    Do you have a ground connection, there is none on...

    Do you have a ground connection, there is none on your diagram ?
  2. As it says, this is one way to generate the...

    As it says, this is one way to generate the sequence of 64 bit pattern, and can be adapted for other patterns. The code only generates the bit patterns and displays them for inspection. It does not...
  3. The following fairly simple code generates the...

    The following fairly simple code generates the shifted patter, SPI is replaced with prints



    uint64_t registerBuffer;
    uint64_t pattern = 0b11;
    /* This will give two identical outputs as start...
  4. Replies
    4
    Views
    206

    With a sampling clock of 38.5 kHz then the period...

    With a sampling clock of 38.5 kHz then the period values have a time granularity of 25.97 uS.
    Measuring a 110Hz signal, then gives an uncertainty of 0.3 Hz,

    deltaf = 110 - 1/(1/110 + 1/38500) =...
  5. Replies
    11
    Views
    487

    You could add a FRAM SPI serial ram nonvolatile...

    You could add a FRAM SPI serial ram nonvolatile storage chip, claiming 100 trillion read/write cycle endurance
  6. i am surprised that there has been no discussion...

    i am surprised that there has been no discussion of the FreqMeasureMulti library. The code is there and simple to test, so why not give it a try.
  7. Replies
    10
    Views
    339

    Teensy 3.2 and 3.6 have different mappings for...

    Teensy 3.2 and 3.6 have different mappings for PTC8. According to the schematics at https://www.pjrc.com/teensy/schematic.html

    On 3.2 PTC8 is indeed Arduino pin 28
    On 3.6 PTC8 is mapped to...
  8. The boring suggestion, before building a PCB to...

    The boring suggestion, before building a PCB to control 8 stepper motors take the time and build a pcb for controlling a single stepper motor. Use this one to find out what mistakes you have made and...
  9. Replies
    21
    Views
    589

    Shot in the dark, discard any eventual incoming...

    Shot in the dark, discard any eventual incoming MIDI messages:



    // MIDI Controllers should discard incoming MIDI messages.
    while (usbMIDI.read()) {
    }
  10. Replies
    21
    Views
    589

    Can you guarantee that there are no conditions,...

    Can you guarantee that there are no conditions, yield function activity, handling of USB interrupts, timers or other background activities, so that the main loop handling of (count==1000) condition...
  11. Replies
    21
    Views
    589

    Increasing the count in the Intervall timer...

    Increasing the count in the Intervall timer callback, and setting the count to 0 in the main loop looks like dangerous practice.

    count should at least be declared volatile
  12. You can speed up the interrupt timing by using ...

    You can speed up the interrupt timing by using digitalWriteFast(debugpin,HIGH);.

    Also take a look at the freqMeasure library that uses flextime hardware capture mode, captures the timer value at...
  13. Replies
    6
    Views
    1,060

    The output pulse void encoderISR(){ ...

    The output pulse

    void encoderISR(){

    digitalWrite(motorStep, HIGH);
    digitalWrite(motorStep, LOW);

    }// end encoderISR
    might be to short, so perhaps some kind of delay or simply toggle the...
  14. Replies
    3
    Views
    685

    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...
  15. 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();
  16. 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,...
  17. 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...
  18. 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...
  19. #define PRETRIGSAMPLES 30 for...

    #define PRETRIGSAMPLES 30



    for (row=0; row <PRETRIGSAMPLES; row++)
    {
    int micRow = (row+ndex)%PRETRIGSAMPLES;
    sendMics[row][0]=mic1[micRow];
    ...
  20. 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.
  21. 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...
  22. 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;
    ...
  23. Replies
    2
    Views
    875

    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;
  24. 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:...
  25. 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...
  26. 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...
  27. Replies
    8
    Views
    1,729

    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...
  28. Replies
    5
    Views
    1,400

    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.
  29. Replies
    8
    Views
    2,250

    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.
  30. 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...
  31. 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...
  32. 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.
    ...
  33. 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);
    ...
  34. Replies
    3
    Views
    1,309

    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...
  35. Check the following discussion: ...

    Check the following discussion:

    https://github.com/FastLED/FastLED/issues/368
  36. Replies
    3
    Views
    1,046

    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...
  37. Replies
    12
    Views
    1,768

    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 :
  38. Replies
    12
    Views
    1,768

    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...
  39. Replies
    12
    Views
    1,768

    Turning off the interrupts will stop USB Serial...

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

    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...
  41. Replies
    9
    Views
    4,721

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

    Serial.printf(":%02d",digits)
  42. 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,...
  43. Replies
    5
    Views
    1,378

    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
  44. Replies
    5
    Views
    1,378

    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...
  45. 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...
  46. DMA on both sender and receiver, after a...

    DMA on both sender and receiver, after a preliminary handshake to start the transfer ?
  47. Replies
    13
    Views
    3,019

    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.
  48. Replies
    13
    Views
    3,019

    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...
  49. 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...
  50. 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
Results 1 to 50 of 307
Page 1 of 7 1 2 3 4