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
    10
    Views
    151

    That can be a great way to fry both the Teensy...

    That can be a great way to fry both the Teensy and the LED. The LED pulls the voltage down to 1.2V and excess current from the Teensy output pin.
    Always use current limiting resistors!!!
  2. Replies
    10
    Views
    151

    Are you measuring the voltage over the LED? Any...

    Are you measuring the voltage over the LED? Any series resistor ?
  3. Replies
    6
    Views
    155

    Then try to add in some pixel stuff into the...

    Then try to add in some pixel stuff into the loop(), removed everything that looks like motors and doors and audio.
    This needs the correct led data pin numbers as of previous post to do anything,...
  4. Replies
    6
    Views
    155

    Next issue , lines 16-18, the led data pins...

    Next issue , lines 16-18, the led data pins cannot be 32, 31 and 30 on an UNO, changing to 2, 3 and 4 gives a sketch that compiles for UNO but of course doesnt do anything since the loop() is empty
  5. Replies
    6
    Views
    155

    First issue: you lost the closing brace in the...

    First issue: you lost the closing brace in the loop() function.


    void loop() {
    // put your main code here, to run repeatedly:


    }
  6. Replies
    72
    Views
    1,110

    What would AUDIO_SAMPLE_RATE_EXACT be then, given...

    What would AUDIO_SAMPLE_RATE_EXACT be then, given that clocks and PPL's are drifting and trimmed, their exact values unknown ?
  7. Replies
    72
    Views
    1,110

    When doing this kind of PLL adjustment to sync...

    When doing this kind of PLL adjustment to sync two clocks that both nominally should run at 44100Hz, I think it would be a mistake to say that the AUDIO_SAMPLE_RATE_EXACT has changed, it is still...
  8. The following code works, there is an ugly cast...

    The following code works, there is an ugly cast from (const char **) to (char **) in the addMenu, since I had trouble defining a non const array of arrays of const character strings.



    const...
  9. Replies
    16
    Views
    305

    The AS5X47.h library,...

    The AS5X47.h library, https://github.com/Adrien-Legrand/AS5X47/blob/master/src/AS5X47Spi/AS5X47Spi.cpp, does not seem to use SPI settings, that might create problems with the Teensy 4.0
  10. Since you already have two Snooze related...

    Since you already have two Snooze related questions in the Technical Support & Questions I guess nobody is super interested in answering this third question on the same issues.
  11. well midi serial is 32,5 kbaud, about 3200 bytes...

    well midi serial is 32,5 kbaud, about 3200 bytes per second, and a midi message usually 3 bytes so about 1000 messages per second. Now this is more than most midi receivers can handle.

    So how to...
  12. Replies
    15
    Views
    257

    Ahh and cache is supposed to improve performance,...

    Ahh and cache is supposed to improve performance, perhaps only PSARAM should be cached in this situation.
  13. Could be so simple that 16 CC messages without...

    Could be so simple that 16 CC messages without any pause overflows the serial out buffer.
  14. Replies
    15
    Views
    257

    Yes, but the OP has a 400nS interrupt that runs...

    Yes, but the OP has a 400nS interrupt that runs at 1MHz, the probability of a TimerTick hitting that memory write during the microsecond that the Timer Tick fires is 150 nS out of every 1000nS (1MHz)...
  15. Replies
    15
    Views
    257

    Could it be that the timer interrupt is...

    Could it be that the timer interrupt is interrupted by another interrupt ?
  16. Replies
    4
    Views
    208

    Arduino Stream parseFloat could be what you need:...

    Arduino Stream parseFloat could be what you need:
    https://www.arduino.cc/reference/tr/language/functions/communication/stream/streamparsefloat/

    The following code snippet (untested) should...
  17. The rev C shields have DOUT, audio data from...

    The rev C shields have DOUT, audio data from shield to Teensy on pin 13, and the SD card clock on pin 14, so when only playing music pin 13 can be used for blinking. On rev D boards the SD card clock...
  18. The OP updated his SPI library to a more recent...

    The OP updated his SPI library to a more recent version, one that does not reference SDREG when compiling for Teensy 3.x or 4.x
  19. Its in your sketch line 150 as the error says,...

    Its in your sketch line 150 as the error says, SDREG is the AVR status register and does not exist on the Teensy 4.
    The vs1053 code seems to be written for Arduino AVR processors and not adapted to...
  20. Replies
    13
    Views
    378

    This led blinking is probably pretty, but it is...

    This led blinking is probably pretty, but it is not easy to help when the code you run when testing is not the code you share in the forum :(

    Also if you want to be 100% sure of having the pullup...
  21. If dispCounts interrupts doCounts while the...

    If dispCounts interrupts doCounts while the counts++ is happening, then the resetting of counts in counts = 0; might not happen.
    Problem is that both interrupts both reads and writes counts.
    ...
  22. Replies
    10
    Views
    291

    Where do you get the input pulses on pin 22 from...

    Where do you get the input pulses on pin 22 from ? You write the you dont move the servo, something is sending out a pulsed signal ?

    You should perhaps discard the first reading since you dont...
  23. Replies
    12
    Views
    309

    If the pins are in a single port you can do a...

    If the pins are in a single port you can do a read/modify/write update operation to the ouput data register to change only the bits/pins you are interested in a single write operation.
  24. Its a complex process. Before the serial monitor...

    Its a complex process. Before the serial monitor can accept any data the USB hardware must do signalling handshakes, and then the operating system on your PC must realize a new USB device is...
  25. Place the potVal[i] = EEPROM.read(bankAddr[i]);...

    Place the potVal[i] = EEPROM.read(bankAddr[i]); reads in the setup() function, and then create a 'save' function to store them back from a 'magical' user input.
    Dont mix up the pot settings and...
  26. You will also want to look into the debounce...

    You will also want to look into the debounce libraries, to make a single button press into what you want, a single button press.
  27. The baudrate is not really important for Serial...

    The baudrate is not really important for Serial over USB, it all runs at full USB speed anyway. On some cards that uses serial to usb converters like Arduino UNO the baudrate affects the speed for...
  28. This code might do what you want, I had no hooked...

    This code might do what you want, I had no hooked up buttons so use 1 and 2 in serial monitor to simulate button presses.



    int bankAddr[] = {10, 11, 12};
    int buttonState1;
    int...
  29. So to be clear there are two buttons, one...

    So to be clear there are two buttons, one BankNumber button, scrolling 1 -> 2 -> 3 -> 1 -> 2 ... and one FirstSelectedPresetWithinBank button going through values 1 -> 4 -> 7 -> 1 ...

    Since the...
  30. Use one elapsedMillis or elapsedMicros for every...

    Use one elapsedMillis or elapsedMicros for every activity that happens with regular intervals, and then check for events like USB inputs or file play status changes. Dont stop in a delay loop waiting...
  31. Replies
    3
    Views
    226

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

    Do you have a ground connection, there is none on your diagram ?
  32. 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...
  33. 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...
  34. Replies
    4
    Views
    265

    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) =...
  35. Replies
    11
    Views
    630

    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
  36. 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.
  37. Replies
    10
    Views
    426

    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...
  38. 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...
  39. Replies
    21
    Views
    780

    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()) {
    }
  40. Replies
    21
    Views
    780

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

    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
  42. 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...
  43. Replies
    6
    Views
    1,286

    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...
  44. Replies
    3
    Views
    726

    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...
  45. 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();
  46. 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,...
  47. 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...
  48. 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...
  49. #define PRETRIGSAMPLES 30 for...

    #define PRETRIGSAMPLES 30



    for (row=0; row <PRETRIGSAMPLES; row++)
    {
    int micRow = (row+ndex)%PRETRIGSAMPLES;
    sendMics[row][0]=mic1[micRow];
    ...
  50. 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.
Results 1 to 50 of 338
Page 1 of 7 1 2 3 4