Needing some help with code errors

Been trying to get this going but keep getting errors. Really new at this so any help is greatly appreciated.
This code is about 3 or 4 years old so it might need some updating?

Arduino: 1.8.5 (Windows 10), Board: "Adafruit Gemma (ATtiny85 @ 8MHz)"
"
C:\Users\sigar\AppData\Local\Temp\arduino_modified_sketch_407705\sketch_jun15f.ino: In function 'void setRingsToIdleValues()':

sketch_jun15f:159: error: 'setTargetColor' was not declared in this scope

IDLE_PEAK_SAT, IDLE_PEAK_VALUE, IDLE_TROUGH_SAT, IDLE_TROUGH_VALUE);

^

C:\Users\sigar\AppData\Local\Temp\arduino_modified_sketch_407705\sketch_jun15f.ino: In function 'void fire()':

sketch_jun15f:180: error: 'setTargetColor' was not declared in this scope

AIM_SAT, AIM_PEAK_VALUE, AIM_SAT, AIM_TROUGH_VALUE);

^

sketch_jun15f:187: error: 'setTargetColor' was not declared in this scope

FIRE_SAT, FIRE_VALUE, FIRE_SAT, FIRE_VALUE);

^

C:\Users\sigar\AppData\Local\Temp\arduino_modified_sketch_407705\sketch_jun15f.ino: In function 'void loop()':

sketch_jun15f:201: error: 'setTargetColor' was not declared in this scope

IDLE_PEAK_SAT, IDLE_PEAK_VALUE, IDLE_TROUGH_SAT, IDLE_TROUGH_VALUE);

^

Using library Adafruit_NeoPixel at version 1.1.6 in folder: C:\Users\sigar\Documents\Arduino\libraries\Adafruit_NeoPixel
exit status 1
'setTargetColor' was not declared in this scope

unibeam code.zip (6.46 KB)

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Have you got the code set for the correct board?

Thanks.. Tom... :slight_smile:

@Tom

A 6 bYte kByte zip will probably take a few posts to post; might also contain multiple files.

// edit: stupid cell phone auto correct

sterretje:
@Tom

A 6 bYte zip will probably take a few posts to post; might also contain multiple files.

Yes its 18K and doesn't have a ino extension.
How much memory is there on a Gemma Attiny85?
Tom... :slight_smile:

Hi,
Where did you get the code from?

Tom.. :slight_smile:

You are new to arduino. This sketch is 3 or 4 years old. Ergo, you didn't write it - it's copy/pasted from somewhere.

And it's missing a piece, it's missing the declaration of setTargetColor.

Maybe you only copied part of the sketch. Maybe the sketch spans several files, and you only have the one. Maybe the library has changed. Maybe the sketch never worked in the first place. Who knows? To work it out, I would need the entire sketch, and possibly a link to where you got it from.

If you are building a thing and just want some code that works, head over to the Gigs and Collaborations subforum and ask for help there.

If you want to learn, click the 'resources>getting started/tutorials' link on the menubar of this web page. Personally, I always suggest that new people should do (or at least read) the first few chapters of any one of the dozens of C++ tutorials available on the web.

Your arduino IDE comes with a whole mess of example sketches. If you have installed the adafruit neopixel library, you will find adafruit example sketches under File>Examples>Adafruit Neopixel.

But copy/pasting a big sketch that doesn't work and attempting to fix it piece-by-piece by asking for help here at each stage of the process won't really work for you. I mean, imagine being new to car mechanics, buying a car that doesn't run, and trying to get it going by asking for help on a car forum. You'll just get a series of increasingly irritated replies that you won't understand, because it will be clear that you don't have the background knowledge you need to understand the help you are being given.

TL;DR: Click 'resources'. Do the tutorials.

Scott2719's post in Gigs & Collaborations:
http://forum.arduino.cc/index.php?topic=553578