Looks exactly the same. Code different.
At the top:
#define rainbow_numberofcolors 7
const unsigned short rainbowcols[rainbow_numberofcolors] = {
rgbto16(255,0,0), rgbto16(255,165,0), rgbto16(255,255,0), rgbto16(0,128,0), rgbto16(0,0,255), rgbto16(75,0,130), rgbto16(238,130,238)
};
In the start:
unsigned int barheight = dispheight/rainbow_numberofcolors;
for( i = 0; i < rainbow_numberofcolors-1; i = i + 1 ){
plotblock(0, i*barheight, dispwidth, barheight, rainbowcols[i]);
}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.