Deprecated updateType(), updateLength() and setPin()

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Shredy777
 
Posts: 2
Joined: Sat Oct 16, 2021 6:59 pm

Deprecated updateType(), updateLength() and setPin()

Post by Shredy777 »

Hello there,

I'm trying to understand the explanation on the deprecated functions updateType(), updateLength() and setPin(). It says in the documentation that we now need to use the 'new' keyword with the first constructor syntax (length, pin, type). It is a bit hard for me to understand how to exactly use this, as I cannot find an example anywhere. Is there anybody who can explain this in a bit more detail?

Many thanks in advance :)

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Deprecated updateType(), updateLength() and setPin()

Post by mikeysklar »

Can you link to the documentation?

User avatar
Shredy777
 
Posts: 2
Joined: Sat Oct 16, 2021 6:59 pm

Re: Deprecated updateType(), updateLength() and setPin()

Post by Shredy777 »

Yeah of course!

https://adafruit.github.io/Adafruit_Neo ... pixel.html

Its this part:
Adafruit_NeoPixel::Adafruit_NeoPixel ( void )
"Empty" NeoPixel constructor when length, pin and/or pixel type are not known at compile-time, and must be initialized later with updateType(), updateLength() and setPin().

Returns
Adafruit_NeoPixel object. Call the begin() function before use.
Note
This function is deprecated, here only for old projects that may still be calling it. New projects should instead use the 'new' keyword with the first constructor syntax (length, pin, type).

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”