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

Search:

Type: Posts; User: mlu

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    52

    You have 16 leds in the matrix and 24 steps per...

    You have 16 leds in the matrix and 24 steps per beat, that makes it a bit tricky to count the beats, every beat is 24=6*4 steps that is one and a half full matrix of steps.

    Also the lastTime...
  2. Replies
    2
    Views
    81

    Time libraries are supposed to be able to handle...

    Time libraries are supposed to be able to handle times before 1970, so the times can be represented as negative numbers.

    If you are sure that your use of time is after 1970 you can...
  3. All interesting but the OP problem was USBMIDI is...

    All interesting but the OP problem was USBMIDI is to fast for i2c, and yes what I felt was USB MIDI client
  4. Perhaps filter the incoming midi data, keep the...

    Perhaps filter the incoming midi data, keep the latest master values of controllers and only update changes to the slave every ... say 1 ms or send as often as the i2c can handle dependent on how...
  5. Replies
    7
    Views
    276

    You will not do any ISR based timing at more than...

    You will not do any ISR based timing at more than a fraction of the processor clock divided by ( ISR setup cycles + ISR execute cycles + ISR return cycles). This might be fast compared to audio...
  6. Replies
    8
    Views
    262

    Looks like binary data is received and not...

    Looks like binary data is received and not converted to printable form ... but

    How can anyone help without knowing anything about the code you are actually running, or what dta you are supposedly...
  7. Its a queue with maximal size equal to sample...

    Its a queue with maximal size equal to sample window, so a ring buffer should work fine. My guess is that on average the length should be something like 2log(N), if the values are a bit randomly...
  8. The key to understanding the algorithm are the...

    The key to understanding the algorithm are the following properties of the list L of (sample volume, sample index) pairs

    * L is always sorted by increasing sample index/sample time since we only...
  9. Replies
    4
    Views
    213

    Serial.peek() ?? Sorry that's the first, you...

    Serial.peek() ??

    Sorry that's the first, you probably have to read them as they come in to a buffer and process the when them end markers arrive
  10. I assume you want the data in descriptions array...

    I assume you want the data in descriptions array to be in binary format, in that case they must be prefixed with 0b like


    0b0000011100000111,


    Your program only outputs the data once in the...
  11. Not necessarily, your frame rate calculation is...

    Not necessarily, your frame rate calculation is just valid for the image transmission, but the sensor array has a minimum exposure time in order to create a useful image, that would be the frame time...
  12. Do I get the picture right, the camera is above...

    Do I get the picture right, the camera is above the hammers, is this a standing piano so the camera sees the edge of the hammers, or is like a grand piano so the camera sees the top/back of the...
  13. Here is a ring buffer variant to test also ...

    Here is a ring buffer variant to test also



    /* Control a set of solenoids with MIDI
    * Note on messages trigger solenoids, and they will be turned off after a certain amount of ms has passed
    ...
  14. Its not my project, but I agree that this a could...

    Its not my project, but I agree that this a could be a good way to handle something like 100 solenoids, a number to big for the Teensy pincounts. In this case there would be a solenoid array, or...
  15. I have tested your original code on a Teensy 3.6...

    I have tested your original code on a Teensy 3.6 and a virtual midi keyboard on MacOS, outputs just connected to led's. With only these 5 possible solenoids its very fast, in order of ten...
  16. With all delays equal and the time always...

    With all delays equal and the time always monotonically increasing its a simple queue, I would use a circular buffer with the reference (pointer) to the head which is the next element to remove, and...
  17. Replies
    4
    Views
    187

    The sending loop in writeSeq callback has no...

    The sending loop in writeSeq callback has no control over the bit timings. So on the Teensy 4 the bitrate will be much higher than for the LC, possibly/probably causing issues for the N64 to read the...
  18. Replies
    3
    Views
    290

    Try the following: float voltage = 0;...

    Try the following:



    float voltage = 0;
    float voltage_Old = 0;

    int midiNeu = 0 ;
    int midiOLD = 0 ;
  19. Replies
    3
    Views
    290

    You do what you ask for, compare the voltage with...

    You do what you ask for, compare the voltage with the previous voltage, needs a varible to save this, and send midi when threshhold is crossed.
  20. Did you change clock and data pins to you...

    Did you change clock and data pins to you configuration?
  21. Replies
    10
    Views
    407

    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!!!
  22. Replies
    10
    Views
    407

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

    Are you measuring the voltage over the LED? Any series resistor ?
  23. Replies
    6
    Views
    337

    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,...
  24. Replies
    6
    Views
    337

    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
  25. Replies
    6
    Views
    337

    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:


    }
  26. Replies
    75
    Views
    2,771

    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 ?
  27. Replies
    75
    Views
    2,771

    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...
  28. 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...
  29. Replies
    16
    Views
    654

    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
  30. 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.
  31. 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...
  32. Replies
    15
    Views
    543

    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.
  33. 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.
  34. Replies
    15
    Views
    543

    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)...
  35. Replies
    15
    Views
    543

    Could it be that the timer interrupt is...

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

    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...
  37. 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...
  38. 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
  39. 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...
  40. Replies
    13
    Views
    530

    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...
  41. 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.
    ...
  42. Replies
    10
    Views
    487

    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...
  43. Replies
    12
    Views
    772

    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.
  44. 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...
  45. 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...
  46. 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.
  47. 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...
  48. 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...
  49. 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...
  50. 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...
Results 1 to 50 of 358
Page 1 of 8 1 2 3 4