Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 19 of 19

Thread: Teensyduino 1.39 Released

  1. #1
    Administrator Paul's Avatar
    Join Date
    Oct 2012
    Posts
    272

    Teensyduino 1.39 Released

    Teensyduino 1.39 has been released.

    https://www.pjrc.com/teensy/td_download.html

    No changes were made since 1.39-beta2.

  2. #2
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    884
    I'm working on an update for DMASPI to work with the refactored SPI classes.

  3. #3
    Senior Member
    Join Date
    Mar 2013
    Location
    Austin TX
    Posts
    406
    Just FYI, please pull a new i2c_t3 release to include for your next TD version. There have been a few bug fixes since the version included in TD 1.39. Here is the link:
    https://github.com/nox771/i2c_t3

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    16,290
    Quote Originally Posted by nox771 View Post
    Just FYI, please pull a new i2c_t3 release to include for your next TD version.
    Done, and I just sent you a pull request for the 1 tiny customization that was in my copy.

  5. #5
    Senior Member
    Join Date
    Mar 2013
    Location
    Austin TX
    Posts
    406
    Quote Originally Posted by PaulStoffregen View Post
    Done, and I just sent you a pull request for the 1 tiny customization that was in my copy.
    I merged this. GitHub and forum download are updated.

  6. #6
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    884
    DMASPI was updated and tested on a T3.6 (SPI0 and SPI1). Thank you for creating a common base for the SPIs, Paul!

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    16,290
    Kurt actually deserves most of the credit for unifying the SPI classes!

  8. #8
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    884
    It only took about two years to convince you: https://forum.pjrc.com/threads/28155...ll=1#post68641

    Would probably be longer if this was standard arduino...

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    5,184
    EventResponder::runFromYield(); in yield breaks standing use of replacing/removing the 'weak' yield() to keep Teensy Bare Metal.

    Minimal-Blink-fails-with-void-yield()

  10. #10
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    884
    Patched yield() declaration (https://github.com/PaulStoffregen/co...8c3f8b8151bf81) also helps with the Zilch library (cooperative multitasking).

  11. #11
    I just tried to use SPI1 on a teensy 3.2. The compile failed with "SPI1 was not declared in this scope". If I compile as a Teensy 3.6, 3.5, or LC the compile completes. The compile fails on teensy 3.0 and 3.2/3.1. Doesn't the 3.2 have the second SPI hardware?

  12. #12
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,573

    Cool

    Quote Originally Posted by dundakitty View Post
    I just tried to use SPI1 on a teensy 3.2. The compile failed with "SPI1 was not declared in this scope". If I compile as a Teensy 3.6, 3.5, or LC the compile completes. The compile fails on teensy 3.0 and 3.2/3.1. Doesn't the 3.2 have the second SPI hardware?
    No, the Teensy 3.1/3.2 only has 1 SPI bus. The LC has 2 SPI buses and the 3.5/3.6 have 3 SPI buses. Note, on the 3.5/3.6, only the first SPI is buffered, which means you might want to put high speed devices only on the first bus.

    On the LC/3.5/3.6, the standard 2nd SPI bus uses pin 0 for MOSI1 (pin 21/A7 is the alternate MOSI1) and pin 1 for MISO1 (pin 5 is the alternate MISO1).

    The MISO2/MOSI2 pins are on solder pads underneath the Teensy 3.5/3.6.

  13. #13
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,236
    As far as I know the T3.2 does not have a second SPI port. If you look at the card that comes with the board you will notice that the SPI pins (11, 12, 13) are simply marked as DIN/DOUT/SCK...

    Where as on for example on the T3.5 they are marked as MOSI0, MISO0, SCK0. Note: the naming of the pins sort of changed from DOUT->MOSI (Data Out --- Master Out Slave IN)
    DIN->MISO (Data In --- Master In Slave Out)

  14. #14
    Thanks, I was trying to use 11, 12, 13 as SPI and 7,8,14 as SPI1. Guess it's a single SPI but alternate pins.

  15. #15
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,573
    Quote Originally Posted by dundakitty View Post
    Thanks, I was trying to use 11, 12, 13 as SPI and 7,8,14 as SPI1. Guess it's a single SPI but alternate pins.
    Yes, that is correct.

  16. #16
    Senior Member
    Join Date
    Jul 2014
    Location
    New York
    Posts
    546
    Know 1.40 is out but I just downloaded the lastest fastLED library and it threw an error for the T3.5 (see below). I deleted it and used the one downloaded with TD1.39 and it worked fine again. Just wanted to give you all a heads up.

    Code:
    In file included from C:\Users\CyberPalin\Documents\Arduino\libraries\FastLED/FastLED.h:51:0,
    
                     from C:\Users\CyberPalin\Documents\Arduino\TeensyOpenMV2\TeensyOpenMV2.ino:10:
    
    C:\Users\CyberPalin\Documents\Arduino\libraries\FastLED/fastpin.h: In instantiation of 'class FastPin<31u>':
    
    C:\Users\CyberPalin\Documents\Arduino\libraries\FastLED/platforms/avr/clockless_trinket.h:96:49:   required from 'class ClocklessController<31u, 39, 39, 77, (EOrder)10u, 0, false, 10>'
    
    C:\Users\CyberPalin\Documents\Arduino\libraries\FastLED/chipsets.h:460:7:   required from 'class WS2811Controller800Khz<31u, (EOrder)10u>'
    
    C:\Users\CyberPalin\Documents\Arduino\libraries\FastLED/FastLED.h:110:52:   required from 'class WS2811<31u, (EOrder)10u>'
    
    C:\Users\CyberPalin\Documents\Arduino\libraries\FastLED/FastLED.h:297:39:   required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = WS2811; unsigned char DATA_PIN = 31u; EOrder RGB_ORDER = (EOrder)10u]'
    
    C:\Users\CyberPalin\Documents\Arduino\TeensyOpenMV2\TeensyOpenMV2.ino:98:56:   required from here
    
    C:\Users\CyberPalin\Documents\Arduino\libraries\FastLED/fastpin.h:206:2: error: static assertion failed: Invalid pin specified
    
      static_assert(validpin(), "Invalid pin specified");
    
      ^

  17. #17
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    16,290
    Quote Originally Posted by mjs513 View Post
    Know 1.40 is out but I just downloaded the lastest fastLED library and it threw an error for the T3.5 (see below).
    I tried just now, but I was unable to reproduce the problem. Since I don't have TeensyOpenMV2.ino, I opened FastLED's DemoReel100 example. I selected Teensy 3.5 and left all the settings at their defaults.

    Here's a screenshot, using Arduino 1.8.5 and Teensyduino 1.40-beta2.

    Click image for larger version. 

Name:	sc.png 
Views:	35 
Size:	38.1 KB 
ID:	11685

  18. #18
    Senior Member
    Join Date
    Jul 2014
    Location
    New York
    Posts
    546
    Thanks for checking Paul. I had two copies of FastLED, one in my Arduino Lib folder and one in the Teensy libraries that I downloaded with TD. The revision of both (library.properties) is at 3.1.6. Then I get the message (with both installed):
    Code:
    Multiple libraries were found for "FastLED.h"
     Used: C:\Users\CyberPalin\Documents\Arduino\libraries\FastLED
     Not used: C:\Local Programs\arduino-1.8.5\hardware\teensy\avr\libraries\FastLED
    Error compiling for board Teensy 3.5.
    When I deleted the copy in the Arduino libraries folder it worked fine. Not sure why this would happen. But anyway, TeensyOpenMV is too big to send so I copied the FastLED stuff from it to its own sketch and was able to reproduce the problem (using 1.85/1.40 now) if I had the two libs installed since it only uses one or the other.

    Just by way of an update the version that I downloaded via the library manager in the IDE is the problem. The version that is part of the TD works fine. (Just tested as I was writing this).

    Code:
    #include <FastLED.h>
    
    Thanks
    Mike
    
    //Malek Systems RGB LED WS2812B
    #define DATA_PIN 31
    #define NUM_LEDS 8
    #define BRIGHTNESS  64
    CRGB leds[NUM_LEDS];
    
    void setup() {
      //LED Setup
      delay(2000);
      FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
      FastLED.setBrightness(  BRIGHTNESS );
    
      for(int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) {
        // Turn our current led on to white, then show the leds
        leds[whiteLed] = CRGB::White;
        // Show the leds (only one of which is set to white, from above)
      }
      FastLED.show();
    
    }
    
    void loop() {
      // put your main code here, to run repeatedly:
    
    }

  19. #19
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    16,290
    Thanks for confirming. I'm taking this one off my issues list.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •