Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- long color = 0x000000;
- color = 0xFFFFFF
- for (int color = 0x000000; color <= 0xFFFFFF; ++color)
- const int step = 8; // Select this to be a power of two if you want the maximum brightness to be reachable
- for( int red = 0x00; red <= 0xFF; red += step ) {
- for( int green = 0x00; green <= 0xFF; green += step ) {
- for( int blue = 0x00; blue <= 0xFF; blue += step ) {
- const int color = blue << 16 + green << 8 + red;
- // Change the led settings here.
- }
- }
- }
- for(int hue=0; hue<360; hue++)
- setColorHSV(hue,1,1);
- unsigned int i;
- for(i = 0; i <= 0xFF; i++)
- {
- rgb = 0xFF0000 | i<<8;
- setLed(rgb);
- }
- while(--i > 0)
- {
- rgb = 0x00FF00 | i<<16;
- setLed(rgb);
- }
- for(i = 0; i <= 0xFF; i++)
- {
- rgb = 0x00FF00 | i;
- setLed(rgb);
- }
- while(--i > 0)
- {
- rgb = 0x0000FF | i<<8;
- setLed(rgb);
- }
- for(i = 0; i <= 0xFF; i++)
- {
- rgb = 0x0000FF | i<<16;
- setLed(rgb);
- }
- while(--i > 0)
- {
- rgb = 0xFF0000 | i;
- setLed(rgb);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement