Help with Missing Filename Error?
hello everyone! having issue code have had no issues running before. today while trying upload code (no changes made) received error:
avr-g++: error: missing filename after '-o'
exit status 1
error compiling.
this first time have received error. mean? using fastled library adafruit pro trinket.
here code using.
thanks in advance awesome help!
avr-g++: error: missing filename after '-o'
exit status 1
error compiling.
this first time have received error. mean? using fastled library adafruit pro trinket.
here code using.
code: [select]
#include <fastled.h>
#define led_pin_a 5 // pin connecting left side bank of helmet leds
#define led_pin_b 6 // pin connecting right side
#define buttonpin 3 // button change patterns
#define num_leds 32 // num of ws2811 leds in each - total 32 x 2 = 64
#define brightness 255
#define led_type ws2811
#define color_order grb
crgb leds[num_leds];
#define updates_per_second 100
crgbpalette16 currentpalette;
tblendtype currentblending;
extern crgbpalette16 myredwhitebluepalette;
extern const tprogmempalette16 myredwhitebluepalette_p progmem;
//int buttonstate = low;
//int ledson = high;
//int state = high; // current state of output pin
//int previous = low; // previous reading input pin
//long time = 0; // last time output pin toggled
//long debounce = 200; // debounce time, increase if output flickers
void setup() {
// serial.begin(57600);
// pinmode(buttonpin, input);
//pinmode(13,output);
delay( 500 ); // power-up safety delay
fastled.addleds<led_type, led_pin_a, color_order>(leds, num_leds*4).setcorrection( typicalledstrip );
fastled.addleds<led_type, led_pin_b, color_order>(leds, num_leds*4).setcorrection( typicalledstrip );
fastled.setbrightness( brightness );
// currentpalette = rainbowcolors_p;
currentblending = linearblend;
// currentblending = noblend;
}
void loop()
{
//changepaletteperiodically();
// buttonstate = digitalread(buttonpin);
// digitalwrite(13,state);
// serial.println(high);
// if (buttonstate == high && previous == low && millis() - time > debounce) {
// if (state == high)
//state = low;
//else
// state = high;
//time = millis();
}
//previous = buttonstate;
// if (state==high) {setupcrazypalette(); ledson=high;}
// else { setupblackpalette(); ledson=low;}
static uint8_t startindex = 0;
startindex = startindex + 1; /* motion speed */
fillledsfrompalettecolors( startindex);
fastled.show();
fastled.delay(1000 / updates_per_second);
}
void fillledsfrompalettecolors( uint8_t colorindex)
{
uint8_t brightness = brightness;
for( int = 0; < 8; i++) {
leds[4*i]= colorfrompalette( currentpalette, colorindex+i, brightness, currentblending);
leds[4*i+1]= colorfrompalette( currentpalette, colorindex+i, brightness, currentblending);
leds[4*i+2]= colorfrompalette( currentpalette, colorindex+i, brightness, currentblending);
leds[4*i+3]= colorfrompalette( currentpalette, colorindex+i, brightness, currentblending);
colorindex += 4;
}
}
// there several different palettes of colors demonstrated here.
//
// fastled provides several 'preset' palettes: rainbowcolors_p, rainbowstripecolors_p,
// oceancolors_p, cloudcolors_p, lavacolors_p, forestcolors_p, , partycolors_p.
//
// additionally, can manually define own color palettes, or can write
// code creates color palettes on fly. shown here.
void changepaletteperiodically()
{
uint8_t secondhand = (millis() / 1000) % 65;
static uint8_t lastsecond = 99;
if( lastsecond != secondhand) {
lastsecond = secondhand;
if( secondhand == 0) { currentpalette = rainbowcolors_p; currentblending = linearblend; }
if( secondhand == 10) { currentpalette = rainbowstripecolors_p; currentblending = noblend; }
if( secondhand == 15) { currentpalette = rainbowstripecolors_p; currentblending = linearblend; }
if( secondhand == 20) { setuppurpleandgreenpalette(); currentblending = linearblend; }
if( secondhand == 25) { setuptotallyrandompalette(); currentblending = linearblend; }
if( secondhand == 30) { setupblackandwhitestripedpalette(); currentblending = noblend; }
if( secondhand == 35) { setupblackandwhitestripedpalette(); currentblending = linearblend; }
if( secondhand == 40) { currentpalette = cloudcolors_p; currentblending = linearblend; }
if( secondhand == 45) { currentpalette = partycolors_p; currentblending = linearblend; }
if( secondhand == 50) { currentpalette = myredwhitebluepalette_p; currentblending = noblend; }
if( secondhand == 55) { currentpalette = myredwhitebluepalette_p; currentblending = linearblend; }
if( secondhand == 60) { setupcrazypalette(); currentblending = linearblend; }
}
}
// function fills palette totally random colors.
void setuptotallyrandompalette()
{
for( int = 0; < 16; i++) {
currentpalette[i] = chsv( random8(), 255, random8());
}
}
// function sets palette of black , white stripes,
// using code. since palette array of
// sixteen crgb colors, various fill_* functions can used
// set them up.
void setupblackandwhitestripedpalette()
{
// 'black out' 16 palette entries...
fill_solid( currentpalette, 16, crgb::black);
// , set every fourth 1 white.
currentpalette[0] = crgb::white;
currentpalette[4] = crgb::white;
currentpalette[8] = crgb::white;
currentpalette[12] = crgb::white;
}
void setupblackpalette()
{
// 'black out' 16 palette entries...
fill_solid( currentpalette, 16, crgb::black);
}
// function sets palette of purple , green stripes.
void setuppurpleandgreenpalette()
{
crgb purple = chsv( hue_purple, 255, 255);
crgb green = chsv( hue_green, 255, 255);
crgb black = crgb::black;
currentpalette = crgbpalette16(
green, green, black, black,
purple, purple, black, black,
green, green, black, black,
purple, purple, black, black );
}
void setupcrazypalette()
{
crgb purple = chsv( hue_purple, 255, 255);
crgb green = chsv( hue_green, 255, 255);
crgb black = crgb::black;
crgb red = crgb::red;
crgb orange = crgb::orange;
crgb yellow = crgb::yellow;
crgb aqua = crgb::cyan;
crgb teal = crgb::teal;
crgb fuchsia = crgb::fuchsia;
crgb blue = crgb::blue;
currentpalette = crgbpalette16(red, orange, yellow, green,
aqua, teal, purple, fuchsia,
red, orange, yellow, green,
aqua, teal, blue, fuchsia
);
}
const tprogmempalette16 myredwhitebluepalette_p progmem =
{
crgb::red,
crgb::gray,
crgb::blue,
crgb::black,
crgb::red,
crgb::gray,
crgb::blue,
crgb::black,
crgb::red,
crgb::red,
crgb::gray,
crgb::gray,
crgb::blue,
crgb::blue,
crgb::black,
crgb::black
};
thanks in advance awesome help!
have updated ide or same version when worked?
Arduino Forum > Using Arduino > Installation & Troubleshooting > Help with Missing Filename Error?
arduino
Comments
Post a Comment