mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-12 15:14:26 +02:00
Updated FAQ #3 (markdown)
@@ -25,7 +25,7 @@ void PixelCountChanged(uint16_t newCount) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### Dynamically create one
|
#### Dynamically create one
|
||||||
The key word here is dynamic. The best practice when dealing with key feature change is to dynamical create the object and recreate it when things change. It will often lead to smaller program code size even though you may have to type more. See the following snippet of code as an example of how to do this.
|
The key word here is dynamic. The best practice when dealing with key feature change is to dynamically create the object and recreate it when things change. It will often lead to smaller program code size even though you may have to type more. See the following snippet of code as an example of how to do this.
|
||||||
The caveat to this solution is that if it happens often, memory will become fragmented slowing down your sketch. This is best used when it happens rarely.
|
The caveat to this solution is that if it happens often, memory will become fragmented slowing down your sketch. This is best used when it happens rarely.
|
||||||
```
|
```
|
||||||
// declare your object as dynamic, a pointer to it, the *
|
// declare your object as dynamic, a pointer to it, the *
|
||||||
|
Reference in New Issue
Block a user