当前位置:网站首页>LVGL 8.2 LED
LVGL 8.2 LED
2022-07-04 14:35:00 【Fairy sword love】
establish 3 individual LED Example
static void lv_example_led_1(void)
{
/*Create a LED and switch it OFF*/
lv_obj_t* led1 = lv_led_create(lv_scr_act()); // establish LED object
lv_obj_align(led1, LV_ALIGN_CENTER, -80, 0); //LV_ALIGN_CENTER Alignment -80,0
lv_led_off(led1); // LED OFF
/*Copy the previous LED and set a brightness*/
lv_obj_t* led2 = lv_led_create(lv_scr_act()); // establish LED object
lv_obj_align(led2, LV_ALIGN_CENTER, 0, 0); //LV_ALIGN_CENTER Alignment 0,0
lv_led_set_brightness(led2, 150); // Set up LED brightness
lv_led_set_color(led2, lv_palette_main(LV_PALETTE_RED)); // Red
/*Copy the previous LED and switch it ON*/
lv_obj_t* led3 = lv_led_create(lv_scr_act()); // establish LED object
lv_obj_align(led3, LV_ALIGN_CENTER, 80, 0); //LV_ALIGN_CENTER Alignment 80,0
lv_led_on(led3); // LED ON
}
Running effect
- Will be the first 2 individual LED Lighten up
lv_led_on(led2);
- Running effect
边栏推荐
- Digi重启XBee-Pro S2C生产,有些差别需要注意
- R language uses dplyr package group_ The by function and the summarize function calculate the mean and standard deviation of the target variables based on the grouped variables
- 【信息检索】分类和聚类的实验
- Opencv3.2 and opencv2.4 installation
- Solutions to the problems of miui12.5 red rice k20pro using Au or povo2
- sql优化之查询优化器
- Transplant tinyplay for imx6q development board QT system
- SqlServer函数,存储过程的创建和使用
- Leetcode 61: 旋转链表
- Digi restarts XBee Pro S2C production. Some differences need to be noted
猜你喜欢
Leetcode T48:旋转图像
flink sql-client.sh 使用教程
Alcohol driving monitoring system based on stm32+ Huawei cloud IOT design
Talk about 10 tips to ensure thread safety
【C语言】指针笔试题
阿里被裁员工,找工作第N天,猎头又传来噩耗...
电商系统中红包活动设计
ML之shap:基于boston波士顿房价回归预测数据集利用shap值对XGBoost模型实现可解释性案例
Chapter 17 process memory
WT588F02B-8S(C006_03)单芯片语音ic方案为智能门铃设计降本增效赋能
随机推荐
remount of the / superblock failed: Permission denied
R language uses the mutation function of dplyr package to standardize the specified data column (using mean function and SD function), and calculates the grouping mean of the standardized target varia
尊重他人的行为
A keepalived high availability accident made me learn it again
统计php程序运行时间及设置PHP最长运行时间
实时数据仓库
AI and Life Sciences
Leetcode T48: rotating images
Leetcode T47: 全排列II
流行框架:Glide的使用
软件测试之测试评估
R language uses the DOTPLOT function of epidisplay package to visualize the frequency of data points in different intervals in the form of point graph, and uses the by parameter to specify the groupin
Combined with case: the usage of the lowest API (processfunction) in Flink framework
Learn kernel 3: use GDB to track the kernel call chain
【信息检索】分类和聚类的实验
AI与生命科学
实战解惑 | OpenCV中如何提取不规则ROI区域
opencv3.2 和opencv2.4安装
Leetcode t47: full arrangement II
Codeforce:c. sum of substrings