Teensyduino 1.54 Beta #5

Status
Not open for further replies.
Looks like many of them would be easy to get awy from. Looks like many/most of them are under some form of #if to either RASPI or windows..

the ones <time.h> or "time.h" are probably genuine system libraries while "Time.h" should be changed, and then one can get rid of the "Time.h" file
 
Most if not all of them will just work when deleting Time.h
Even "TimeAlarms" seems to use it in the readme only?!? (did not look at the sourcecode)
 
@Paul, if you add a check to the 1.54 installer that allows an empty target directory (or at least an empty "... hardware/teensy/" directory) only, this would be way to have a clean install - (and you can get rid of Time.h) without having to delete something.
 
I completed the upgrade to MacOS Big Sur 11.0.1. Sure enough, just as Theremingenieur said in msg #40, this latest beta runs fine on Big Sur. Here's a screenshot from my freshly updated 13 inch Macbook Air.

sc.jpg

@daj59 - Did you try looking at the System Preferences > Security & Privacy settings, as I suggested on msg #43, to check if you've accidentally disallowed Teensyduino access to Documents or other things it needs?
 
Many thanks,
The problem is updating to beta 11.1, it did indeed work fine on 11.01 release.
I will wait till the next release, currently there are a few other things not working quite right apart from teenysduino, I might come off the beta program.
David


PaulStoffregen;261844]I completed the upgrade to MacOS Big Sur 11.0.1. Sure enough, , this latest beta runs fine on Big Sur. Here's a screenshot from my freshly updated 13 inch Macbook Air.
 
Ah, now I see. Today was my very first use of MacOS Big Sur. When I read msg #30 "latest big sur 11.1", I didn't manage to equate "11.1" to mean a beta version.

I am going to keep support for MacOS, but I'm drawing the line at testing with Apple's betas. There's far too much work to do on the Teensy side to mess with those.

In other news, it seems rEFInd Boot Manager is incompatible with Big Sur. :(
 
As I said in msg#40, the same applies to the 11.1 beta which is running here and which allowed me to take the screenshots of a working Teensyduino installation.
But I second Paul, it's a waste of time to test at least with early Apple betas. I've too often seen that things were newly introduced first and then removed in later betas. And that's why Apple tells everybody to not install betas on production machines ;)
 
@Paul - the teensy Command line utilty was updated for T_4.x - but presented text still suggest: "The usage text does say it's just for the 3.x series"

I've seen two posts in recent days - it may be the download page or text in the code or both?
 
Unrelated to Teensy, I'm going to be happy when Apple releases 11.1. The bright red background on 11.0 kinda hurts my eyes. Yeah, I know it can be changed in System Preferences - but for the sake of screenshots while testing I always leave the default background.

I'm still hoping to put off buying yet another Mac machine until the 2nd gen M1 chip.
 
I’m afraid you will be disappointed, Paul. 11.1 has by default still the red background. To protect myself from getting eye cancer, I replaced it manually...
 
A new Announcements Thread was created : TeensyDuino-New-Release-Thread-Subscribe-for-notice-of-future-releases

When a New release of TeensyDuino is made an Admin can add a post like:

Code:
TeensyDuino 1.53 has been released.

For release notes and added information see :: [URL="https://forum.pjrc.com/threads/61623-Teensyduino-1-53-Released"]pjrc.com/...[B]Teensyduino-1-53-Released[/B][/URL]

If seeing this email would be of interest then go to thread TeensyDuino-New-Release-Thread-Subscribe-for-notice-of-future-releases

and :: Click Thread Tools and select : "Subscribe to this thread ..."

>> It is a closed thread so it won't get pinged except for Admin release notes
 
@Paul - what's up with included lib :: T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\Adafruit_NeoPixel

Of course the raw Adafruit version does not work on Teensy, and of course they are updating it to include NRF's and whatever CPU of the month etc. And of course I got some of their NRF's so they put the LIB in sketchbook\libraries - and the build used it.

I got this 8 strip : protosupplies.com/.../ws2812-addressable-rgb-led-stick-module/

CODE sample there uses : #include <Adafruit_NeoPixel.h>

I removed the sketchbook\libraries copy of the updated library.
But sample code calls things in an updated version so build breaks not having ColorHSV, gamma32 : strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));

I got the strip working removing the gamma32 and making an INO local unClass'y copy of : uint32_t ColorHSV(uint16_t hue, uint8_t sat, uint8_t val) {

It is working with hacked in (..., sat, val ) params like :: strip.setPixelColor(i, ColorHSV(pixelHue, 127, 127 ));

Actual Errors using linked code from product:
Code:
-fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=154 -DARDUINO=10600 -DARDUINO_TEENSY36 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\TEMP\\arduino_build_ws2812_leds.ino/pch" "-IT:\\arduino-1.8.13_t54\\hardware\\teensy\\avr\\cores\\teensy3" "-IT:\\arduino-1.8.13_t54\\hardware\\teensy\\avr\\libraries\\Adafruit_NeoPixel" "T:\\TEMP\\arduino_build_ws2812_leds.ino\\sketch\\ws2812_leds.ino.cpp" -o "T:\\TEMP\\arduino_build_ws2812_leds.ino\\sketch\\ws2812_leds.ino.cpp.o"
T:\tCode\LEDS_WS\ws2812_leds\ws2812_leds.ino: In function 'void rainbow(int)':
T:\tCode\LEDS_WS\ws2812_leds\ws2812_leds.ino:68:36: error: 'class Adafruit_NeoPixel' has no member named 'gamma32'
       strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
                                    ^
T:\tCode\LEDS_WS\ws2812_leds\ws2812_leds.ino:68:50: error: 'class Adafruit_NeoPixel' has no member named 'ColorHSV'
       strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
                                                  ^
T:\tCode\LEDS_WS\ws2812_leds\ws2812_leds.ino: In function 'void theaterChaseRainbow(int)':
T:\tCode\LEDS_WS\ws2812_leds\ws2812_leds.ino:83:32: error: 'class Adafruit_NeoPixel' has no member named 'gamma32'
         uint32_t color = strip.gamma32(strip.ColorHSV(hue)); // hue -> RGB
                                ^
T:\tCode\LEDS_WS\ws2812_leds\ws2812_leds.ino:83:46: error: 'class Adafruit_NeoPixel' has no member named 'ColorHSV'
         uint32_t color = strip.gamma32(strip.ColorHSV(hue)); // hue -> RGB
                                              ^
Using library Adafruit_NeoPixel at version 1.1.7 in folder: T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\Adafruit_NeoPixel 
exit status 1

Reading the product page it notes:
Code:
The program below uses the Adafruit NeoPixel library to exercise the stick.  It is a shortened version of the strandtest example program that is installed when the library is downloaded
Using the Strandtest.INO of course works from the library installed with TeensyDuino 1.54b5 - given right pin # and # LEDS
 
Last edited:
I just happen to have an 8 led setup on my desk...

Note: I have not tried the version installed by Teensyduino in awhile but instead have the Adafruit version installed.

I ran the simple strand test with T3.6 and it runs. Note the Strandtest does not appear to play with all 8 of these LEDS when I set it to 8 count, works OK with set to 16...

Next will try with T4.1... Appears to be working.

May next check with Teensy version of library.

EDIT - I removed the Adafruit version from my library folder and loaded up the strand test from the Teensy and it appears to run.

@Paul - I am wondering if you wish for one of us to sync up to the Adafruit current code and/or do like some of the display drivers and no longer install it, but instead allow users to install directly from Adafruit either by github or Library Manager ?
 
Hi Paul, I probably need to do some double checking. With the 8 pixel thingy I am seeing some semi add results with pixel addressing. But not 100% sure exactly how it is configured ;)

Code:
#include <Adafruit_NeoPixel.h>

#define LED_PIN    6  // Pin used to address the LEDs
#define LED_COUNT 8   // How many NeoPixels are attached to the Arduino?
// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

void step() {
  Serial.println("Press any key to continue");
  while (Serial.read() == -1);
  while (Serial.read() != -1);
}

//===============================================================================
//  Initialization
//===============================================================================
void setup() {
  while (!Serial && millis() < 5000) ;
  Serial.begin(115200);
  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip.show();            // Turn OFF all pixels ASAP
  strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)
  step();
  for (uint8_t i = 0; i < LED_COUNT; i++) {
    strip.setPixelColor(i, strip.Color(127,   0,   0));         //  Set pixel's color (in RAM)
    strip.show();                          //  Update strip to match
    step();    
  }

}
screenshot.jpg

And looking at the pictures(left to right top to bottom) first one turns red, second one turns green, then Bright green...
Will rerun with T3.6... Then go back to your version to see if same? Then maybe grab another Neopixel Bar or ring I have sitting around.

EDIT::: My mistake, did not know these were RGBW leds (Cool) , so now back to Adafruit library...
 
See post #64 :: Latest ( update here dated 11/29/2020 ) :: "the raw Adafruit version does not work on Teensy"

Question "what's up with included lib" :: Was because I tried to add the needed Class parts and got bad fails with the quick paste. Didn't go as far as 'CodeCompare' as the diffs looked significant with all the AdaF added boards just paging from the top.

So it either needs:
> Teensy Tweaks into AdaFruit to drop it from TD
> AdaF Tweaks into TeensyDuino
> or just a known deficient library.

About once a month I spend 5 minutes thinking about the Adafruit NRF Sense / CLUE boards for a project - and Library Manager updated a Dozen or more AdaFruit libraries, so they are a moving target
 
Note: I have the Adafruit version installed through the library manager: 1.2.0 - The library manager does not show me any updates available on it...
Also WinMerge of my grab of their github and the released version appear to be the same.


I went to the website you mentioned and downloaded their sketch:
Code:
// A basic everyday NeoPixel strip test program.

#include <Adafruit_NeoPixel.h>

#define LED_PIN    1  // Pin used to address the LEDs
#define LED_COUNT 8   // How many NeoPixels are attached to the Arduino?
// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRBW + NEO_KHZ800);

//===============================================================================
//  Initialization
//===============================================================================
void setup() {
  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip.show();            // Turn OFF all pixels ASAP
  strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)
}

//===============================================================================
//  Main
//===============================================================================
void loop() {
  // Fill along the length of the strip in various colors...
  colorWipe(strip.Color(255,   0,   0), 50); // Red
  colorWipe(strip.Color(  0, 255,   0), 50); // Green
  colorWipe(strip.Color(  0,   0, 255), 50); // Blue

  // Do a theater marquee effect in various colors...
  theaterChase(strip.Color(127, 127, 127), 50); // White, half brightness
  theaterChase(strip.Color(127,   0,   0), 50); // Red, half brightness
  theaterChase(strip.Color(  0,   0, 127), 50); // Blue, half brightness

  rainbow(10);             // Flowing rainbow cycle along the whole strip
  theaterChaseRainbow(50); // Rainbow-enhanced theaterChase variant
}

// Fill strip pixels one after another with a color. 
void colorWipe(uint32_t color, int wait) {
  for(int i=0; i<strip.numPixels(); i++) { // For each pixel in strip...
    strip.setPixelColor(i, color);         //  Set pixel's color (in RAM)
    strip.show();                          //  Update strip to match
    delay(wait);                           //  Pause for a moment
  }
}

// Theater-marquee-style chasing lights. 
void theaterChase(uint32_t color, int wait) {
  for(int a=0; a<10; a++) {  // Repeat 10 times...
    for(int b=0; b<3; b++) { //  'b' counts from 0 to 2...
      strip.clear();         //   Set all pixels in RAM to 0 (off)
      // 'c' counts up from 'b' to end of strip in steps of 3...
      for(int c=b; c<strip.numPixels(); c += 3) {
        strip.setPixelColor(c, color); // Set pixel 'c' to value 'color'
      }
      strip.show(); // Update strip with new contents
      delay(wait);  // Pause for a moment
    }
  }
}

// Rainbow cycle along whole strip. 
void rainbow(int wait) {
  for(long firstPixelHue = 0; firstPixelHue < 5*65536; firstPixelHue += 256) {
    for(int i=0; i<strip.numPixels(); i++) { 
      int pixelHue = firstPixelHue + (i * 65536L / strip.numPixels());
      strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
    }
    strip.show(); // Update strip with new contents
    delay(wait);  // Pause for a moment
  }
}

// Rainbow-enhanced theater marquee. Pass delay time (in ms) between frames.
void theaterChaseRainbow(int wait) {
  int firstPixelHue = 0;     // First pixel starts at red (hue 0)
  for(int a=0; a<30; a++) {  // Repeat 30 times...
    for(int b=0; b<3; b++) { //  'b' counts from 0 to 2...
      strip.clear();         //   Set all pixels in RAM to 0 (off)
      for(int c=b; c<strip.numPixels(); c += 3) {
        int      hue   = firstPixelHue + c * 65536L / strip.numPixels();
        uint32_t color = strip.gamma32(strip.ColorHSV(hue)); // hue -> RGB
        strip.setPixelColor(c, color); // Set pixel 'c' to value 'color'
      }
      strip.show();                // Update strip with new contents
      delay(wait);                 // Pause for a moment
      firstPixelHue += 65536 / 90; // One cycle of color wheel over 90 frames
    }
  }
}
Edited it to use pin 1 and RGBW
Build looks like using right libraries:
Code:
ultiple libraries were found for "Adafruit_NeoPixel.h"
 Used: C:\Users\kurte\Documents\Arduino\libraries\Adafruit_NeoPixel
 Not used: C:\arduino-1.8.13\hardware\teensy\avr\libraries\Adafruit_NeoPixel
Using library Adafruit_NeoPixel at version 1.7.0 in folder: C:\Users\kurte\Documents\Arduino\libraries\Adafruit_NeoPixel 
"C:\\arduino-1.8.13\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-size" -A "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_584113/zzz.ino.elf"
Sketch uses 25052 bytes (0%) of program storage space. Maximum is 8126464 bytes.
Global variables use 45748 bytes (8%) of dynamic memory, leaving 478540 bytes for local variables. Maximum is 524288 bytes.
C:\Program Files\TyQt\TyCommanderC.exe upload --autostart --wait --multi C:\Users\kurte\AppData\Local\Temp\arduino_build_584113/zzz.ino.TEENSY41.hex 
Waiting for user selection

and it appears to be running fine. (I also just verified that it will compile for T3.6 as well)
 
Opened IDE and updated Adafruit Neopixel is 1.7.0 here:
adafNeo1.7.png

Maybe 1.2.0 is a typo as build above shows: Using library Adafruit_NeoPixel at version 1.7.0 in folder: C:\Users\kurte\Documents\Arduino\libraries\Adafruit_NeoPixel
 
More Oddity - with AdaF neopixel in and latest 1.7.0, neither of these compile to T_3.6 ::TD strandtest nor included :: T:\tCode\libraries\Adafruit_NeoPixel\examples\strandtest\strandtest.ino

>> Same strip IDE compiles and runs this fine on AdaFruit NRF Bluefruit Sense with latest AdaFruit_NeoPixel lib installed.

<EDIT>:: Doing a T_3.6 BUILD IN IDE WORKS TOO !?!?!?! Building in SubLimeText is where the error is coming from?

This line in both errors - this from AdaFruit build with T_3.6:: starting with this > Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
Code:
T:\TEMP\arduino_build_strandtest.ino\sketch\strandtest.ino.cpp.o: In function `rainbow(int)':
T:\tCode\libraries\Adafruit_NeoPixel\examples\strandtest/strandtest.ino:120: undefined reference to `Adafruit_NeoPixel::ColorHSV(unsigned short, unsigned char, unsigned char)'
T:\tCode\libraries\Adafruit_NeoPixel\examples\strandtest/strandtest.ino:120: undefined reference to `Adafruit_NeoPixel::gamma32(unsigned long)'
T:\TEMP\arduino_build_strandtest.ino\sketch\strandtest.ino.cpp.o: In function `theaterChaseRainbow(int)':
T:\tCode\libraries\Adafruit_NeoPixel\examples\strandtest/strandtest.ino:139: undefined reference to `Adafruit_NeoPixel::ColorHSV(unsigned short, unsigned char, unsigned char)'
T:\tCode\libraries\Adafruit_NeoPixel\examples\strandtest/strandtest.ino:139: undefined reference to `Adafruit_NeoPixel::gamma32(unsigned long)'
T:\TEMP\arduino_build_strandtest.ino\sketch\strandtest.ino.cpp.o: In function `__static_initialization_and_destruction_0':
[B]T:\tCode\libraries\Adafruit_NeoPixel\examples\strandtest/strandtest.ino:26: undefined reference to `Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned short, unsigned short, unsigned short)'
[/B]collect2.exe: error: ld returned 1 exit status
%
Multiple libraries were found for "Adafruit_NeoPixel.h"
 Used: T:\tCode\libraries\Adafruit_NeoPixel
 Not used: T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\Adafruit_NeoPixel
Using library Adafruit_NeoPixel at version 1.7.0 in folder: T:\tCode\libraries\Adafruit_NeoPixel 
exit status 1

The TeensyDuino strandtest doesn't use those new exotic functions and only errors on the constructor as above:
Code:
T:\TEMP\arduino_build_strandtest.ino\sketch\strandtest.ino.cpp.o: In function `__static_initialization_and_destruction_0':
[B]T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\Adafruit_NeoPixel\examples\strandtest/strandtest.ino:17: undefined reference to `Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned short, unsigned short, unsigned short)'[/B]
collect2.exe: error: ld returned 1 exit status
%
Multiple libraries were found for "Adafruit_NeoPixel.h"
 Used: T:\tCode\libraries\Adafruit_NeoPixel
 Not used: T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\Adafruit_NeoPixel
Using library Adafruit_NeoPixel at version 1.7.0 in folder: T:\tCode\libraries\Adafruit_NeoPixel 
exit status 1
 
Just updated above ... for some reason SublimeText has failed to duplicate and build for first time?

It is working on T_3.6 when built from IDE ????
 
Just updated above ... for some reason SublimeText has failed to duplicate and build for first time?

It is working on T_3.6 when built from IDE ????

FIXED with CLEAN build! There was something stuck in TEMP build cache from last try it seems and linking didn't see the new lib?

Indeed - building :: T:\tCode\libraries\Adafruit_NeoPixel\examples\strandtest\strandtest.ino

Works on T_3.6 and T_4.1 and T_4.0 ( on FRDM 4236 ) all on Pin #33 AND a T_3.2 on pin #6

>> So the 'deal' is ::
This TeensyDuino library seems to be removable :: T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\Adafruit_NeoPixel\

Thanks for followup @KurtE : I wonder if AdaF NeoPixel was update from the NOV update to the version 1.7.0 today? Something put bad 'cached' build files in TEMP :(
 
Last edited:
Status
Not open for further replies.
Back
Top