lpcware

how to change the colour of the RGB LED

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by lpc1769 on Wed Oct 10 06:07:30 MST 2012
hi , i have been having problems in changing the rgb led to red.

anyone able to help?

if ((ledMask & RGB_RED) != 0)
                {
                    GPIO_SetValue( 2, 0);
                }
                else
                {
                    GPIO_ClearValue( 2, 0 );
                }
        if ((ledMask & RGB_BLUE) != 0) {
            GPIO_SetValue( 0, (1<<26) );
        } else {
            GPIO_ClearValue( 0, (1<<26) );
        }
        if ((ledMask & RGB_GREEN) != 0) {
            GPIO_SetValue( 2, (1<<1) );
        } else {
            GPIO_ClearValue( 2, (1<<1) );
        }
    }

Outcomes