Do you mean that you don't want to use resistors in series with the LEDs or you don't want to have to adjust their values to make the light levels the same ?
What problems are you having ?
Can you post a smaller but complete program that illustrates the problem ?
yes i know i need resistors thats not my problem. the problem is that i will need different resistors for the 3 Anodes to have a nice white and the DIN IEC 63 do net have the right resistors. my idea is that i set the maximun value for red to for example to 200 so i can use for all anodes the same resitor.
BearGear:
yes i know i need resistors thats not my problem. the problem is that i will need different resistors for the 3 Anodes to have a nice white and the DIN IEC 63 do net have the right resistors. my idea is that i set the maximun value for red to for example to 200 so i can use for all anodes the same resitor.
What is your difficulty in doing that? Your code looks okay.
the code is working nice but iwant to set the max pwm signal for example for red to 200, for green to 220 and blue to 230. so i can use 3times the same resistor.
why nobody understand me? I know i need resistors and i use them. When you have the value 255 on the analogoutput the led will shine with full brightness but when i use for the Red green an blue led a 220ohm resistor the color red will shine brighter than green and blue because red need a voltage of 2V4v. Blue and green 3,5V. when i set the max value tho the red analogoutput to 200 instead of 255 the red led will not shine so bright.
I understand what you want to do but I fail to see what the problem is.
By all means write a small program to establish the correct value to use in analogWrite() for each colour of LED and the resistors you are using then use those values in any larger program that requires the LEDs. Make the values constants in the larger program and give them sensible names.
its not so easy when you see the code im useing i found something that can maybe solve my problem but i dont know how to intigrade this to my code. can i use the constrain funktion?