0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

M5Core2: 円の描画

Posted at

次の描画をします。

IMG_0005.jpg

IMG_0006.jpg

プログラム

cpp/src/main.cpp
#include <M5Core2.h>

// ---------------------------------------------------------------
void draw_circle_proc(int xpos,int ypos,uint16_t color)
{
	for (int it=0; it< 10; it++)
		{
		int rr = 41 + it;
		M5.Lcd.fillCircle(xpos, ypos, rr, color);
		}
}

// ---------------------------------------------------------------
void setup() {
	M5.begin();
	M5.Lcd.fillScreen(BLACK);
}

// ---------------------------------------------------------------
void loop() {
	M5.Lcd.fillScreen(BLACK);
	delay(2000);
	draw_circle_proc(60,120,GREEN);
	delay(2000);
	draw_circle_proc(260,120,GREEN);
	delay(2000);
	draw_circle_proc(60,120,RED);
	delay(2000);
	draw_circle_proc(260,120,RED);
	delay(2000);
}

// ---------------------------------------------------------------

PlatformIO

Build して、 Upload した状況

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?