![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Template for working
Revision 5:d167b5796d32, committed 2021-10-20
- Comitter:
- peterkmarr
- Date:
- Wed Oct 20 11:31:41 2021 +0000
- Parent:
- 4:d129442ea4dd
- Commit message:
- Template
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Oct 17 18:29:13 2021 +0000 +++ b/main.cpp Wed Oct 20 11:31:41 2021 +0000 @@ -21,13 +21,13 @@ /* Set font size, foreground and background Colours */ GUI_SetFont(GUI_FONT_16B_1); - GUI_SetColor(GUI_WHITE); - GUI_SetBkColor(GUI_BLACK); + GUI_SetColor(GUI_DARKBLUE); + GUI_SetBkColor(GUI_GRAY); /* Clear screen and print splash screen */ GUI_Clear(); GUI_SetTextAlign(GUI_TA_HCENTER); - GUI_DispStringAt("asr666 Super Computer", 160, 0); + GUI_DispStringAt("Purple Elephant", 160, 0); } int main() @@ -38,12 +38,12 @@ printf("Starting Supercomputer\r\n"); GUI_SetFont(GUI_FONT_8X16X2X2); - GUI_SetColor(GUI_DARKGREEN); + GUI_SetColor(GUI_ORANGE); uint8_t array[NUMLEDS_X][NUMLEDS_Y]; for (int j=0; j < NUMLEDS_Y; j++) { for (int i=0; i < NUMLEDS_X; i++) { array[i][j]=LED_OFF; - GUI_SetColor(GUI_DARKGREEN); + GUI_SetColor(GUI_ORANGE); GUI_FillCircle(LED_RADIUS+(i)*LED_DIAMETER, TITLE_OFFSET+(j*LED_DIAMETER), LED_RADIUS); } } @@ -51,12 +51,12 @@ int ledx = rand()%NUMLEDS_X; int ledy = rand()%NUMLEDS_Y; if (array[ledx][ledy]==LED_OFF) { - GUI_SetColor(GUI_GREEN); + GUI_SetColor(GUI_ORANGE); GUI_FillCircle(LED_RADIUS+(ledx)*LED_DIAMETER, TITLE_OFFSET+LED_DIAMETER*(ledy), LED_RADIUS); array[ledx][ledy] = LED_ON; } else { - GUI_SetColor(GUI_DARKGREEN); + GUI_SetColor(GUI_RED); GUI_FillCircle(LED_RADIUS+(ledx)*LED_DIAMETER, TITLE_OFFSET+LED_DIAMETER*(ledy), LED_RADIUS); // GUI_FillCircle(8+(ledx)*16, 24+16*(ledy), 8); array[ledx][ledy] = LED_OFF;