These are chat archives for Makuna/NeoPixelBus

27th
Apr 2016
Timothy Shire 2
@tshire2_twitter
Apr 27 2016 00:01
@Makuna I am also looking for support on the ATTINY85 (DigiSpark 16.5mhz). I got my string of 30 GRBW SK6812 working with Adafruit NeoPixel. It might be as easy as using the same board def the that lib supports?
Michael Miller
@Makuna
Apr 27 2016 00:47
@tshire2_twitter the adafruit library uses my esp8266 bitbang and I use their AVR and Arm at the lowest level. Are saying it's not working?
sticilface
@sticilface
Apr 27 2016 19:14
Seem to be having some issues compiling on teensy.. (I'm only trying to use the colour libs, but the animations sketch does not compile)
s18v7p4249kv8qbz80000gn/T/build1da760dc7cee838425d4f0554f30e854.tmp/sketch/NeoPixelAnimation.ino.cpp.o: In function `std::function<float (float)>::operator()(float) const':
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/functional:2470: undefined reference to `std::__throw_bad_function_call()'
/var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/build1da760dc7cee838425d4f0554f30e854.tmp/libraries/NeoPixelBus/internal/NeoPixelAnimator.cpp.o: In function `std::function<void (AnimationParam const&)>::operator()(AnimationParam const&) const':
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/functional:2470: undefined reference to `std::__throw_bad_function_call()'
collect2: error: ld returned 1 exit status
Error compiling for board Teensy 3.2 / 3.1.
and it seems like neopixelbus.h needs to be included before the ILI9341_t3.h lib otherwise swap already defined or something appears
sticilface
@sticilface
Apr 27 2016 19:29
Build options changed, rebuilding all
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/exception:152:0,
                 from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/typeinfo:34,
                 from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/functional:53,
                 from /Users/amelvin/Dropbox/Sketchbook/libraries/NeoPixelBus/src/internal/NeoEase.h:37,
                 from /Users/amelvin/Dropbox/Sketchbook/libraries/NeoPixelBus/src/NeoPixelBus.h:43,
                 from /var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/arduino_modified_sketch_303963/NeoPixelTest.ino:16:
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/bits/exception_ptr.h:118:68: error: macro "swap" requires 2 arguments, but only 1 given
         exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this);
                                                                    ^
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/bits/exception_ptr.h:126:26: error: macro "swap" requires 2 arguments, but only 1 given
       swap(exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
                          ^
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/bits/exception_ptr.h:161:23: error: macro "swap" requires 2 arguments, but only 1 given
     { __lhs.swap(__rhs); }
                       ^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/utility:70:0,
                 from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/tuple:38,
                 from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/functional:55,
                 from /Users/amelvin/Dropbox/Sketchbook/libraries/NeoPixelBus/src/internal/NeoEase.h:37,
                 from /Users/amelvin/Dropbox/Sketchbook/libraries/NeoPixelBus/src/NeoPixelBus.h:43,
                 from /var/folders/nv/8j3v5v0s18v7p4249kv8qbz80000gn/T/arduino_modified_sketch_303963/NeoPixelTest.ino:16:
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/bits/stl_pair.h:194:21: error: macro "swap" requires 2 arguments, but only 1 given
       swap(pair& __p)
                     ^
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/bits/stl_pair.h:254:50: error: macro "swap" passed 4 arguments, but takes just 2
     swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
                                                  ^
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/bits/stl_pair.h:255:35: error: macro "swap" requires 2 arguments, but only 1 given
     noexcept(noexcept(__x.swap(__y)))
                                   ^
/Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/bits/stl_pair.h:256:19: error: macro "swap" requires 2 arguments, but only 1 given
     { __x.swap(__y); }
                   ^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/string:41:0,
                 from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/stdexcept:39,
                 from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/array:38,
                 from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/tuple:39,
                 from /Applications/Arduino.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/c++/4.8.4/functional:55,
                 from /Users/amelvin/Dropbox/Sketchbook/libraries/NeoPixelBus/src/internal/NeoEase.h:37,
                 from /Users/amelvin/Dropbox/Sketchbook/libraries/NeoPixelBus/src/NeoPixelBus.h:43,
                 from /
not sure entirely what this is about.
Michael Miller
@Makuna
Apr 27 2016 19:56
Macros are horrible things to use, they replace all symbols after they are used, so it looks like the ili9341 header has a macro with a very common name which of course can cause problems after that. I wish people would quit using macros altogether. Either reorder, or after including that head put an #undef swap
sticilface
@sticilface
Apr 27 2016 20:14
ah... that made it work. although it seems to have screwed up the min definition that is used by the sketch... but that is no biggie. thanks again!
Michael Miller
@Makuna
Apr 27 2016 20:16
Min max in arduino are also macros, which causes problems, sigh.
sticilface
@sticilface
Apr 27 2016 20:50
mmm
question... can you get the uint32_t out of HtmlColor ... or any reason not to add an operator to allow it?
sticilface
@sticilface
Apr 27 2016 20:59
although pretty easy to get it out
HslColor
color.R << 16 | color.G << 8 | color.B;
Michael Miller
@Makuna
Apr 27 2016 21:03
Isn't it public? Generally just init a rgb, they are lightweight as long as it's a local var.
Yeah, color.Color will give you the unit 32 for an HTC color object.
Html color that is
sticilface
@sticilface
Apr 27 2016 21:14
ah i didn't spot it was public
cheers