Skip to content

Instantly share code, notes, and snippets.

@xpress-embedo
Created March 2, 2020 20:08
This function demonstrates the usage of GUI_DrawGraph function, to randomly plot data generated using random number generator function rand()
void test_draw_graph( void )
{
int x[LCD_GetXSize()];
int i;
GUI_Clear();
GUI_SetColor(GUI_RED);
for (i = 0; i < GUI_COUNTOF(x); i++)
{
x[i] = rand() % LCD_GetYSize()/2;
}
GUI_DrawGraph(x, GUI_COUNTOF(x), 0, 0 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment