Search results

  1. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    Thanks @PaulStoffregen So there's no installer or .json link for unreleased versions? Which "those" files do I need to replace? 'new.cpp', 'new.h', mk20dx128.c? Any others?
  2. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    @PaulStoffregen, I see you've committed another change in the GitHub to 'new.cpp' and 'new.h' that appears to be related to this issue. I'd like to try it in my FastLED application. How do I download and use this unreleased version of Teensyduino? All I know how to do is download and run a...
  3. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    @PaulStoffregen @jmarsh Wow, great detective work! Thanks! Two questions: 1. Out of curiosity, can you go back in Teensyduino history and find where this broke? FastLED definitely worked in some releases prior to 1.59. 2. Can you propose a code that triggers this failure outside of the...
  4. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    Correction, I only checked the address of the CLEDController class object, not the address of the function to be called. Paul just did that. It indeed appears to be a VTABLE problem. It's just quite vexing that I can't make it happen outside of the FastLED environment.
  5. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    I did try that. The it was pointing to the function as implemented in the derived class ... just like I would have expected.
  6. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    Paul, I came to the exact same conclusion --- Post #4 in this Thread It's a call to a virtual function that's (overridden in a derived class) using a pointer to a base class. I've tried several times to recreate this behavior outside of FastLED using polymorphic function calls like this...
  7. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    PaulStoffregen, I really didn't understand all the minutiae of what installs, uninstalls, etc. But, I assume none of it is a work around for this problem with Teensy 3.x, Correct?
  8. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    Thanks Paul. Where do I download previous versions of the Teensyduino installer? All I can find is v1.59.
  9. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    Well, at lead I know I'm not nuts. Thanks for confirming.
  10. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    Hi Paul, thanks for the followup. Just to be on the safe side, I downloaded a fresh (portable) installation of Arduino 1.8.19 and Teensyduino 1.59. I then ran your exact code from Post #6 except that I added two debug prints around the call to ‘FastLED.addLeds<WS2812, DATA_PIN>(leds...
  11. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    @Paul, So, it’s looking to me like it’s not just WS2812Serial that’s broken with Teensyduino 1.59, but all of FastLED. I tried the most basic library example trying both WS2812Serial and standard ‘NEOPIXEL’ types in the initialization. Nothing works. I tried FastLED versions v3.6, v3.5, v3.4...
  12. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    Paul, I've noted the failure with FastLED v3.6.0 and and 3.4.0. The working Arduino 1.8.15 / Teensyduino 1.54 combination uses FastLED 3.3.0. I've narrowed the problem down to this call in FastLED.cpp: pLed->init(); In fact, it seems any call to a virtual function declared in the...
  13. G

    Is FastLED / WS2812Serial Broken in Teensyduino 1.59?

    Using Arduino 1.8.19 / Teensyduino 1.59 and the included example FastLED_Cylon.ino. The code never returns from the function call: LEDS.addLeds<WS2812SERIAL, DATA_PIN, RGB>(leds, NUM_LEDS); Same thing happens using Sloeber 4.3.3 + https://www.pjrc.com/teensy/package_teensy_index.json It does...
  14. G

    Teensyduino and FastLED

    I'm wondering if there's a reason to include a (custom?) version of FastLED in Teensyduino. Looking at the standard FastLED source code on GitHub, it appears to me that the newer versions (I only checked 3.4, 3.5, and 3.6) all support the special PJRC libraries like WS2812Serial right out of the...
  15. G

    Using an Object for Interrupt (and other) Call Backs

    To me, @luni's solution is preferable to reinventing the wheel as Paul proposes with his "Lightweight C++ callbacks" idea. If I understand correctly, std::function won't occupy significant heap space if you just wrap a free (regular) function, static class function, stateless lambda, etc. The...
  16. G

    Using an Object for Interrupt (and other) Call Backs

    I don't know squat about licensing, but if you install the ESP32 core, you can find the files in "....\esp32\hardware\esp32\2.0.11\cores\esp32": esp32-hal-gpio.c FunctionalInterrupt.h FunctionalInterrupt.cpp
  17. G

    Using an Object for Interrupt (and other) Call Backs

    Thanks. Actually, 4-1/2 years later, I've refined my wish a little bit as exactly what I want already exists in ESP32 and ESP8266. Instead of creating a new CallBack class, the Arduino core for those boards allow attachInterrupt() to accept an argument of type std::function<void ()>. Several...
  18. G

    How Should Teensy Respond if Dynamic Memory Can't be Allocated?

    Lots to consider. Thank you very much.
  19. G

    How Should Teensy Respond if Dynamic Memory Can't be Allocated?

    Yea. Unfortunately, 'std::make_unique' appears to call the "regular" new. So, that makes it a two-step process: 1. Use 'new (std::nothrow)' to allocate memory and check for null. 2. If the returned pointer is non-null, use it to make a 'std::unique_ptr'.
  20. G

    How Should Teensy Respond if Dynamic Memory Can't be Allocated?

    Maybe my application is non-standard for a C++ program. I'd be happy for 'new' to gracefully return a nullptr and let my code handle it. That's easy with this application, things would keep working with an appropriate limitation and life would go on.
  21. G

    How Should Teensy Respond if Dynamic Memory Can't be Allocated?

    Thanks. Figures someone would have checked this before I did.
  22. G

    How Should Teensy Respond if Dynamic Memory Can't be Allocated?

    It's a best practice to check if a request for dynamic memory allocation succeeded or failed. So, trying with a T3.2: Using malloc() I get the expected result if there's insufficient memory: #include "Arduino.h" void setup() { Serial.begin(115200); char *ptr = malloc(10000000)...
  23. G

    Communicating between VL6180x & T4.1 using I2C2 instead of I2C

    See 'Adafruit_VL6180X.h' for the prototype of the begin() function: boolean begin(TwoWire *theWire = &Wire) So, it defaults to using Wire, but that can be overridden by supplying a pointer to a different TwoWire object.
  24. G

    std::deque Won't Compile for Teensy 3.x

    (M)inimal (R)eproduceable (E)xample
  25. G

    std::deque Won't Compile for Teensy 3.x

    Yes, it definitely appears related. Thanks.
  26. G

    std::deque Won't Compile for Teensy 3.x

    Hi All. Really simple MRE here. Arduino / Teensyduino 1.8.15 / 1.54 #include <Arduino.h> #include <deque> std::deque<uint8_t> myQueue; void setup() { myQueue.push_back(100); } void loop() { } Error Message...
  27. G

    Roadmap "Dynamic Updates": any effort going on?

    What exactly do you mean by the "Audio Core"? How is it different than the Audio Library?
  28. G

    Problem using AudioInputI2Sslave and AudioOutputUSB together

    First, a caveat. All my Audio Library experience is with T3.x devices, never used a T4.x. That being said, the AudioInputI2Sslave is indeed capable of having responsibility for triggering the update of all audio objects every ~2.9ms. This is easily confirmed by looking at the library source...
  29. G

    Audio Library - Output audio through SPI DAC chip.

    Given the lack of requirements, specifications, and other details, it's impossible to say.
  30. G

    Audio Library - Output audio through SPI DAC chip.

    How do you propose to synchronize the sample rate transfer over SPI to the Audio Library's sampling rate (even if you use a lower rate)?
  31. G

    S/PDIF Input to Teensy

    It looks like your setup has both the WM8804 and the Audio Shield driving the I2S0_RSD0 input on the T3.2. You shouldn't connect two outputs to the same input.
  32. G

    S/PDIF Input to Teensy

    Somebody has to be I2S master. Timing is set by the S/PDIF source, so WM8804 must be in Master mode. Set up Teensy for I2S slave.
  33. G

    Logarithmic / More Natural Fade with Release

    See Reply #6 and Reply #7.
  34. G

    Printing Audio Design

    Snipping Tool
  35. G

    Connecting TOSLINK/SPDIF signal of a TV to Teensy 3.6 DAC

    I see that I missed showing a connection in the circuit diagram from my post that you linked. The diagram should show that LRCLK connects to both Pins 23 and 29 on the T3.2. I did this because I wasn't sure if the same Pin (23) could be used as both the LRCLK input and as the DMA trigger for DAC...
  36. G

    Connecting Two Teensys via I2S

    I posted code for 64 * Fs Quad I2S master and slave in my reply to your previous thread. You could use that as a starting point.
  37. G

    Connecting Two Teensys via I2S

    Why don't you just make your own version of i2s_quad that uses BLCK = 64 * Fs?
  38. G

    Teensy 3.2 SPDIF and I2S

    I used SPDIF I/O and Audio Board I2S I/O in this project: https://forum.pjrc.com/threads/45394-SPDIF-Input-and-Output?highlight=toslink
  39. G

    reading S/PDIF data with Teensy 3.6 (or 4) for a beginner

    I was answering this question:
  40. G

    USB Audio Frame Sync on Teensy 4.0

    Because I've never used S/PDIF on a T4.0. Or, in fact used T4.0. at all. Therefore, I won't make a recommendation based on it. I only recommend solutions that I'm 100% sure will work. I've used the S/PDIF to I2S converter before. I know how it works. I know how I2S on a T3.x works. My projects...
  41. G

    reading S/PDIF data with Teensy 3.6 (or 4) for a beginner

    CORRECTION: In theory, you can have multiple devices connected to the same I2S output, assuming there's only one master and that the electrical parasitics of the connections don't degrade signal integrity too much.
  42. G

    reading S/PDIF data with Teensy 3.6 (or 4) for a beginner

    Only one device at a time can be connected to an I2S input or output. So you can use the DAC part of the Audio Shield at the same time, but not the ADC. You can also use the chip's second I2S I/O channel. That allows S/PDIF input and output as well as Audio Shield input and output. Obviously...
  43. G

    Pixel (Teensy Pixie) SDR

    I've only worked directly with SPI hardware on T3.x. On that family of processors I pretty sure the SPI clock setup doesn't offer the resolution you're looking for. That's why I suggested using one of the FTMs. No experience with the processor on T4.
  44. G

    USB Audio Frame Sync on Teensy 4.0

    It seems to me that the problems of your 3 different threads posted here all stem from the same source --- attempting to use USB audio. Is that a requirement? Can Max/MSP (whatever THAT is) provide S/PDIF output? I can think of a scheme to get perfect sample-accurate synchronization on a T3.6 by...
  45. G

    Pixel (Teensy Pixie) SDR

    The SPI hardware is detailed in the appropriate chip datasheet: https://www.pjrc.com/teensy/datasheets.html I believe at least some of them offer the feature of a continuous clock. Using an FTM might be a better option.
  46. G

    reading S/PDIF data with Teensy 3.6 (or 4) for a beginner

    I've successfully used this board with Teensy 3.2 / 3.6 and the Teensy Audio Library: https://www.amazon.com/gp/product/B07HHPJLWC/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 It does both S/PDIF -> I2S and I2s -> S/PDIF conversion.
  47. G

    Dropped Frames Using AudioInputUSB Object

    Before going too far down the road of trying new hardware, you should take the divide and conquer approach to debug the problem. I'd replace the AudioInputUSB object with a couple of AudioPlayQueue objects that you populate (quickly) in your loop() code with the special test pattern. This should...
  48. G

    Dropped Frames Using AudioInputUSB Object

    * Your IntervalTimer interrupt may have a higher priority than the SWI that triggers all the audio class update() functions. That might cause some funny interactions if the former interrupts the latter. * Your out[] array is accessed in both ISR and non-ISR code, yet is not declared 'volatile'...
  49. G

    How Does Output Object Timing Work?

    If the shift register's latch input is LEVEL sensitive rather than EDGE sensitive, it might look more like this: #include <Audio.h> #include <SPI.h> #include <EventResponder.h> class AudioSpi: public AudioStream, public EventResponder { public: AudioSpi(void) : AudioStream(1...
  50. G

    How Does Output Object Timing Work?

    Interesting problem. Actually, from the description it doesn't seem like @grinch needs to synchronize the SPI transfers to the Audio Library sample rate. Only the latch input of the shift register needs to be synchronous. The SPI can clock the samples into the register at any (sufficiently fast)...
Back
Top