![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Template for working forward
Revision 5:c469dd354de2, committed 2021-10-20
- Comitter:
- leep
- Date:
- Wed Oct 20 11:31:39 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 |
diff -r d129442ea4dd -r c469dd354de2 main.cpp --- a/main.cpp Sun Oct 17 18:29:13 2021 +0000 +++ b/main.cpp Wed Oct 20 11:31:39 2021 +0000 @@ -4,7 +4,7 @@ #include "GUI.h" #include "cy8ckit_028_tft.h" -#define LED_DIAMETER (16) +#define LED_DIAMETER (4) #define LED_RADIUS (LED_DIAMETER/2) #define DISPLAY_X (320) #define DISPLAY_Y (240) @@ -27,7 +27,7 @@ /* Clear screen and print splash screen */ GUI_Clear(); GUI_SetTextAlign(GUI_TA_HCENTER); - GUI_DispStringAt("asr666 Super Computer", 160, 0); + GUI_DispStringAt("CITY3032 Super Computer", 160, 0); } int main() @@ -38,7 +38,7 @@ printf("Starting Supercomputer\r\n"); GUI_SetFont(GUI_FONT_8X16X2X2); - GUI_SetColor(GUI_DARKGREEN); + GUI_SetColor(GUI_RED); uint8_t array[NUMLEDS_X][NUMLEDS_Y]; for (int j=0; j < NUMLEDS_Y; j++) { for (int i=0; i < NUMLEDS_X; i++) { @@ -51,7 +51,7 @@ int ledx = rand()%NUMLEDS_X; int ledy = rand()%NUMLEDS_Y; if (array[ledx][ledy]==LED_OFF) { - GUI_SetColor(GUI_GREEN); + GUI_SetColor(GUI_RED); GUI_FillCircle(LED_RADIUS+(ledx)*LED_DIAMETER, TITLE_OFFSET+LED_DIAMETER*(ledy), LED_RADIUS); array[ledx][ledy] = LED_ON; }