Neopixel is slowing down time reported by mills()

no, this is was only my setup to track down my issue.

Does micros() measure time in a different way?

micros() & milis() are using the same "guts" belowdecks.

-jim lee

Thanks, I will have a look at them. Will this work with the Arduino IDE?

Certainly! I used them for nearly everything I do. in Arduino-land. Buy them by the bagful.

-jim lee

The last time I used one I had to load some extra thing to manage loading the compiled code to the Teensy after the IDE was done with it.

I like the Teensy range, much more powerful than the basic Arduinos. Don't forget that the top end ones are 3V3.

I don't think it'll help you though. Teensy is single threaded too I believe, so it won't help with the library messing with your timing.

Just use two, have one dedicated to the lights (And probably UI) and one that does the sound. I use this approach for a lot of stuff.

Oh! I thought I was replying to the OP. Hello there WB!

teensys now have their own version of the IDE. It works for all Arduinos. Its what I've been using for about a year or so now.

-jim lee

But can use fastLed...

Ick! No! That would make me twice as sad!

Check this out.. Playing .bmp files over neoPixels.

Now if you want a fancy effect, just grab the .bmp file with that drawn in it.

-jim lee

LOL a Arduino Nano is 80X better than the computers used on the Apollo missions

This came up recently again

and I think @jimLee should roll some magic object inheritance thing into his code so it can use any kind of smart LED.

I did so on hands and knees old school style, where I have a little section that catches a higher level way of looking at strips and you can choose at compile time which kind of strip you using along with the traditional information of # of LEDs and which pin they on.

I only use them in very simple ways, however. Perhaps what would be difficult or not worth the time would be all the color handling stuff that I seem to recall is very different between libraries.

a7

@alto777 I do all my color handling in one library colorObj.h. Then I do wrappers for everything color to just accept this object as input & output. Smart pixels, RGB LEDs, color displays etc. At one point I did an object for dot stars.. Are dot Stars what you guys were thinking of?

Do people still use those old RGB LEDs? In my library for those I had to map all the color values to different ranges in order to have it look reasonable at all. I'm thinking maybe its a resistor thing?

-jim lee

As I said, once you're on a Teensy, you can use a library to blast out NeoPixel-type data via DMA.

If you're only controlling one strip, then look at This Library. It uses DMA to send data out a UART pin. It also plays nicely with the (VERY POWERFUL) Teensy Audio Library.

Finally, you can hook that DMA library into FastLED so you'll have all the powerful features of that library too.

Very Cool.

1 Like

At a glance, yes, the dots stars have clock and data lines, that’s how the APA102 strips work.

With your color object and having done the dot stars it seems APA102s are almost if not already there.

a7

The raspberry pi Pico processor has programmable input / output pins. Each pin can run a little state machine independent of the main CPU, along with the DMA function you can refresh WS2812 LEDs and take no time at all so the timers still work.

Good lord, now you have me designing code again. :frowning:

-jim lee

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.