by hivemind » Thu Aug 03, 2006 2:04 pm
by hivemind
Thu Aug 03, 2006 2:04 pm
well, as you can see in my video, they clearly do work properly, and if you are careful they will not damage the MR-C3024 (i once again take no responsibility if you do damage it though). I have my board running, as i said, at 3.3v, so for two leds that means they initialize earlier, and as for red, i just dont power the pwm port fully (not even close for all three) so i just find a balanced number to attain white. The plan at first would have been to use resisters for each LED, but they initialize early and work well, so why bother?
for example, i think to make my eyes a whitish color i would do this:
pwm 0,22 '==green
pwm 1,17 '==red
pwm 2,22 '==blue
And, ill even share my disco lights, i used it to test the LEDs.
'==written by Hivemind===========================================
DIM A AS BYTE '==green variable
DIM B AS BYTE '==red vairable
DIM C AS BYTE '==blue variable
DIM AUP AS BYTE '==A set up/down
DIM BUP AS BYTE '==B set up/down
DIM CUP AS BYTE '==C set up/down
disco_eyes:
IF AUP = 1 THEN A = A+1 '==if A set up then + 1==================
IF AUP = 0 THEN A = A-1 '==else A - 1============================
IF A < 1 THEN AUP = 1 '==check to remain inside of safe range==
IF A > 25 THEN AUP = 0 '========================================
IF BUP = 1 THEN B = B+3 '==if B set up then + 3==================
IF BUP = 0 THEN B = B-3 '==else B - 3============================
IF B < 3 THEN BUP = 1 '==check to remain inside of safe range==
IF B > 25 THEN BUP = 0 '========================================
IF CUP = 1 THEN C = C+2 '==if C set up then + 2==================
IF CUP = 0 THEN C = C-2 '==else C - 2============================
IF C < 2 THEN CUP = 1 '==check to remain inside of safe range==
IF C > 25 THEN CUP = 0 '========================================
PWM 0,A '==green
PWM 1,B '==red
PWM 2,C '==blue
GOTO disco_eyes
'================================================================
**Edited
well, as you can see in my video, they clearly do work properly, and if you are careful they will not damage the MR-C3024 (i once again take no responsibility if you do damage it though). I have my board running, as i said, at 3.3v, so for two leds that means they initialize earlier, and as for red, i just dont power the pwm port fully (not even close for all three) so i just find a balanced number to attain white. The plan at first would have been to use resisters for each LED, but they initialize early and work well, so why bother?
for example, i think to make my eyes a whitish color i would do this:
pwm 0,22 '==green
pwm 1,17 '==red
pwm 2,22 '==blue
And, ill even share my disco lights, i used it to test the LEDs.
'==written by Hivemind===========================================
DIM A AS BYTE '==green variable
DIM B AS BYTE '==red vairable
DIM C AS BYTE '==blue variable
DIM AUP AS BYTE '==A set up/down
DIM BUP AS BYTE '==B set up/down
DIM CUP AS BYTE '==C set up/down
disco_eyes:
IF AUP = 1 THEN A = A+1 '==if A set up then + 1==================
IF AUP = 0 THEN A = A-1 '==else A - 1============================
IF A < 1 THEN AUP = 1 '==check to remain inside of safe range==
IF A > 25 THEN AUP = 0 '========================================
IF BUP = 1 THEN B = B+3 '==if B set up then + 3==================
IF BUP = 0 THEN B = B-3 '==else B - 3============================
IF B < 3 THEN BUP = 1 '==check to remain inside of safe range==
IF B > 25 THEN BUP = 0 '========================================
IF CUP = 1 THEN C = C+2 '==if C set up then + 2==================
IF CUP = 0 THEN C = C-2 '==else C - 2============================
IF C < 2 THEN CUP = 1 '==check to remain inside of safe range==
IF C > 25 THEN CUP = 0 '========================================
PWM 0,A '==green
PWM 1,B '==red
PWM 2,C '==blue
GOTO disco_eyes
'================================================================
**Edited
Last edited by hivemind on Thu Aug 03, 2006 8:29 pm, edited 1 time in total.