Go Down

Topic: NeoPixel + LED running off of Two switches  (Read 898 times) previous topic - next topic

PaulRB

#15
May 30, 2019, 09:27 pm Last Edit: May 30, 2019, 09:54 pm by PaulRB
Then your input pins are floating and won't give a reliable signal. Use INPUT_PULLUP. When the switches are closed, the pins will read LOW, not HIGH as your code currently expects.

JetPackCat

No luck. Errors out when I Try to compile.

Code: [Select]


Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

In file included from C:\Users\lockdown\Documents\Arduino\RGB_THrower_Code\RGB_THrower_Code.ino:2:0:

C:\Users\lockdown\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.006

 #    pragma message "FastLED version 3.002.006"

                     ^

C:\Users\lockdown\Documents\Arduino\libraries\FastLED/controller.h: In member function 'clearLeds':

C:\Users\lockdown\Documents\Arduino\libraries\FastLED/controller.h:76:82: internal compiler error: Segmentation fault

  virtual void clearLeds(int nLeds) { showColor(CRGB::Black, nLeds, CRGB::Black); }

                                                                                  ^

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.



PaulRB

#17
Jun 01, 2019, 01:30 pm Last Edit: Jun 01, 2019, 01:40 pm by PaulRB
That's an unrelated error. Undo your changes or go back to the code in post #6 and see if the error goes away.

Did the IDE auto-upgrade itself or some libraries? There was a recent post about this error on the forum.

PaulRB

Try this:
This is a bug with the version of the compiler used in the most recent AVR board package releases - it happens to some people, but not most (don't get me started about what it says about Arduino that they have not addressed this by either downgrading or upgrading the compiler version in the released core) .

Tools -> Boards -> Board Manger, for the official AVR board package, select 1.6.21 (that's the latest good version), install it, and restart the IDE.

JetPackCat

I just swapped out the board to build for and was able to upload. But still nothing. Have experiemented with while loops but that isn't working for me either.

Go Up