江上酒酒 发表于 2024-11-28 09:10:36

oled屏上显示一个圆

假设想让oled屏上显示一个圆,所对应的程序是自己写,还是有专门的软件生成

Matrix 发表于 2024-11-28 09:27:53

{:4_165:}{:4_165:}

angmall 发表于 2024-11-28 09:51:54

可以用这个程序。
/*****************************************************************************
* @name       :void _draw_circle_8(int xc, int yc, int x, int y, u16 c)
* @date       :2018-08-09
* @function   :8 symmetry circle drawing algorithm (internal call)
* @parameters :xc:the x coordinate of the Circular center
                yc:the y coordinate of the Circular center
                              x:the x coordinate relative to the Circular center
                              y:the y coordinate relative to the Circular center
                              c:the color value of the circle
* @retvalue   :None
******************************************************************************/
void _draw_circle_8(int xc, int yc, int x, int y, u16 c)
{
    GUI_DrawPoint(xc + x, yc + y, c);

    GUI_DrawPoint(xc - x, yc + y, c);

    GUI_DrawPoint(xc + x, yc - y, c);

    GUI_DrawPoint(xc - x, yc - y, c);

    GUI_DrawPoint(xc + y, yc + x, c);

    GUI_DrawPoint(xc - y, yc + x, c);

    GUI_DrawPoint(xc + y, yc - x, c);

    GUI_DrawPoint(xc - y, yc - x, c);
}

网老四 发表于 2024-11-28 11:06:40

只需在屏上显示一个点,然后整个屏用马达带动转起来看,绝对圆,分毫不差

ercircle 发表于 2024-11-28 11:24:38

一般用GUI库,这些画线画圈,显示文字的函数都是封装好的,只需要输入坐标信息、颜色信息。找对应的驱动示例工程里一般就有。

haiyang201 发表于 2024-11-28 11:36:57

可以参考例程函数,直接用也可以

BeHappy 发表于 2024-11-29 01:46:16

遇到过这个需求,没想通,放弃了。后来没事又想,寻思放个图片是不是也可以:-)

江上酒酒 发表于 2024-11-29 15:14:00

感谢各位
页: [1]
查看完整版本: oled屏上显示一个圆