void blinking_light() {
	while(BCHK); // debounce
	graphics_close(); // close any existing window
	graphics_open(45,45);
	graphics_fill(WHITE);
	while(!(BCHK)) {
		graphics_circle_fill(24, 24, 20, GRAY);
		graphics_circle_fill(24, 24, 8, YELLOW);
		graphics_line(6, 24, 42, 24, YELLOW);  // horizontal
		graphics_line(24, 6, 24, 42, YELLOW);  // vertical
		graphics_line(12, 12, 36, 36, YELLOW); // forward slash
		graphics_line(12, 36, 36, 12, YELLOW); // back slash
		graphics_update(); 
		msleep(250);
		if(BCHK) break;
		graphics_circle_fill(24, 24, 20, GRAY);
		graphics_update();
		msleep(250);
	}
	graphics_close();
}
Beispiel #2
0
int main()
{
	camera_open();
	camera_update();
	graphics_open(get_camera_width(), get_camera_height());
	
	while(!get_key_state('Q'))
	{
		camera_update();
		graphics_blit_enc(get_camera_frame(), BGR, 0, 0, get_camera_width(), get_camera_height());
		graphics_circle_fill(get_camera_width() / 2, get_camera_height() / 2, get_camera_height() / 20, 255, 0, 0);
		graphics_update();
	}
	
	camera_close();
	graphics_close();
	
	return 0;
}
Beispiel #3
0
int main(int argc, char ** argv)
{
	graphics_open(100,100);

	int x, j;
	for (j = 0; j < 10; ++j)
	{
		for (x = 0; x < 100; ++x)
		{
			graphics_clear();
			graphics_circle_fill(x, 50, 5, 255, 0, 0);
			graphics_update();
			msleep(10);
		}
	}

	graphics_close();

	return 0;
}