girlwhowasnt:
I do not know the specs of my strip. I got it cheap on ebay and it didn't say or come with anything. I'm using 10k potentiometers. Is this okay, or should I switch them?
Can you post a link? See alsi grumpy's reply.
girlwhowasnt:
It's connected as the link I gave describes, except for the changes I mentioned. Is there a free schematic-drawing program that you guys use for this stuff? I'll have to figure out how to draw it (or just sketch it by hand and take a picture), then get back to you.
You can draw by hand, scan or take a picture and attach it. I'm currently learning 'eagle pcb'.
girlwhowasnt:
How would I know if I accidentally did this? Hopefully I didn't. I turned it off somewhat quickly when I realized it wasn't working, assuming something was wrong. My strip is currently only a piece that I was using for testing, so about a dozen lights.
Use e.g. a modified version of the blink example and test the individual pins. If they work, you're lucky for now. Damage can be done that gets worse over time and eventually kills the pin.
girlwhowasnt:
I don't know how to use these.
I think there are ready made boards. My electronics knowledge is too rusty to advise on transistors or fets.
girlwhowasnt:
Is there a way to know if they're linear or logarithmic? They came in a kit of random stuff and only say "10K" on them.
They will usually state it on the housing. You can use an ohm meter to measure. Put the potentiometer in the middle position; if it reads half the value of the total (5k for a 10k potentiometer), it's linear.
girlwhowasnt:
The only thing I know how to do with buttons is have the lights either on or off, which gives me only 7 color options. I'm afraid I don't quite know what a rotary encoder is. How is it different from a potentiometer? Like I said, I'm VERY new to this. Please bear with me.
A rotary encoder is a device that gives pulses when you turn it. You can count the pulses.
Below a simple example for a code using 2 buttons to increment the intensity of one led / color in a led strip
// led pins
#define LEDRED 9
#define LEDGREEN 9
#define LEDBLUE 9
// buttons
#define PINUP 4
#define PINDOWN 5
void setup()
{
pinMode(PINUP, INPUT_PULLUP); // switch connected between pin and GND
pinMode(PINDOWN, INPUT_PULLUP); // switch connected between pin and GND
pinMode(LEDRED, OUTPUT);
pinMode(LEDGREEN, OUTPUT);
pinMode(LEDBLUE, OUTPUT);
digitalWrite(LEDRED, LOW);
digitalWrite(LEDGREEN, LOW);
digitalWrite(LEDBLUE, LOW);
}
void loop()
{
// current PWM values for LED outputs
static int currentRed = 0;
static int currentGreen = 0;
static int currentBlue = 0;
// if UP button pressed
if (digitalRead(PINUP) == LOW)
{
// if maximum not reached
if (currentRed < 255)
{
// increment intensity
currentRed++;
}
}
// if DOWN button pressed
if (digitalRead(PINDOWN) == LOW)
{
// if minimum not reached
if (currentRed > 0)
{
// decrement value
currentRed--;
}
}
analogWrite(LEDRED, currentRed);
}