当前位置: 首页 > news >正文

最优秀的无锡网站建设什么网站做推广比较好

最优秀的无锡网站建设,什么网站做推广比较好,如何给网站做app,购买软件平台使用iic驱动ssd1306,代码来源hihope\hispark_pegasus\demo\12_ssd1306 本样例提供了一个HarmonyOS IoT硬件接口的SSD1306 OLED屏驱动库,其功能如下: 内置了128*64 bit的内存缓冲区,支持全屏刷新;优化了屏幕刷新速率,…

使用iic驱动ssd1306,代码来源hihope\hispark_pegasus\demo\12_ssd1306

本样例提供了一个HarmonyOS IoT硬件接口的SSD1306 OLED屏驱动库,其功能如下:

  • 内置了128*64 bit的内存缓冲区,支持全屏刷新;
  • 优化了屏幕刷新速率,实测最大帧率10fps;
  • libm_port

是从musl libc中抽取的 sin和 cos的实现;

  • 用于规避链接Hi3861 SDK中的libm_flash.a报错的问题;
  • gif2imgs.py

可用于将gif动图中的帧分离出来;

  • 依赖 pillow 包,可以使用 pip install pillow 命令安装;
  • img2code.py

可用于将图片转为C数组,每个字节表示8个像素;

  • 依赖 opecv-python 包,可以使用 pip install opencv-python 命令安装;
  • 使用Harmony OS的IoT硬件接口;
  • 接口简洁易于使用、易于移植;
  • 内置了测试程序,可直接进行测试;

硬件原理图

IO口定义

I2C API

API名称

说明

I2cInit (WifiIotI2cIdx id, unsigned int baudrate)

用指定的波特速率初始化I2C设备

I2cDeinit (WifiIotI2cIdx id)

取消初始化I2C设备

I2cWrite (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData *i2cData)

将数据写入I2C设备

I2cRead (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData *i2cData)

从I2C设备中读取数据

I2cWriteread (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData *i2cData)

向I2C设备发送数据并接收数据响应

I2cRegisterResetBusFunc (WifiIotI2cIdx id, WifiIotI2cFunc pfn)

注册I2C设备回调

I2cSetBaudrate (WifiIotI2cIdx id, unsigned int baudrate)

设置I2C设备的波特率

ssd1306 API

API名称

说明

void ssd1306_Init(void)

初始化

void ssd1306_Fill(SSD1306_COLOR color)

以指定的颜色填充屏幕

void ssd1306_SetCursor(uint8_t x, uint8_t y)

定位光标

void ssd1306_UpdateScreen(void)

更新屏幕内容

char ssd1306_DrawChar(char ch, FontDef Font, SSD1306_COLOR color)

在屏幕缓冲区绘制1个字符

char ssd1306_DrawString(char* str, FontDef Font, SSD1306_COLOR color)

将完整字符串写入屏幕缓冲区

void ssd1306_DrawPixel(uint8_t x, uint8_t y, SSD1306_COLOR color)

在屏幕缓冲区中绘制一个像素

void ssd1306_DrawLine(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, SSD1306_COLOR color)

用Bresenhem算法画直线

void ssd1306_DrawPolyline(const SSD1306_VERTEX *par_vertex, uint16_t par_size, SSD1306_COLOR color)

绘制多段线

void ssd1306_DrawRectangle(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, SSD1306_COLOR color)

绘制矩形

void ssd1306_DrawArc(uint8_t x, uint8_t y, uint8_t radius, uint16_t start_angle, uint16_t sweep, SSD1306_COLOR color)

绘图角度

void ssd1306_DrawCircle(uint8_t par_x, uint8_t par_y, uint8_t par_r, SSD1306_COLOR color)

用Bresenhem算法画圆

void ssd1306_DrawBitmap(const uint8_t* bitmap, uint32_t size)

绘图位图

void ssd1306_DrawRegion(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t* data, uint32_t size, uint32_t stride)

绘制区域

修改D:\DevEcoProjects\test\src\vendor\rtplay\rt_hi3861\demo\BUILD.gn文件

# Copyright (c) 2023 Beijing HuaQing YuanJian Education Technology Co., Ltd
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#    http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License. import("//build/lite/config/component/lite_component.gni")lite_component("demo") {features = [#"base_00_helloworld:base_helloworld_example",#"base_01_led:base_led_example",#"base_02_loopkey:base_loopkey_example",#"base_03_irqkey:base_irqkey_example",#"base_04_adc:base_adc_example",#"base_05_pwm:base_pwm_example","base_06_ssd1306:base_ssd1306_example",]
}

将D:\DevEcoProjects\test\src\vendor\hihope\hispark_pegasus\demo\12_ssd1306文件复制到D:\DevEcoProjects\test\src\vendor\rtplay\rt_hi3861\demo\base_06_ssd1306中

修改D:\DevEcoProjects\test\src\vendor\rtplay\rt_hi3861\demo\base_06_ssd1306\BUILD.gn

#Copyright (C) 2021 HiHope Open Source Organization .
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#
#limitations under the License.import("//build/lite/config/component/lite_component.gni")lite_component("base_ssd1306_example") {features = ["ssd1306:oled_ssd1306","examples:oled_test","//third_party/libm_port:libm_port"]
}

目录结构

│  config.json
│
├─common
│  └─bsp
│      ├─include
│      └─src
├─demo
│  │  BUILD.gn
│  │
│  ├─base_00_helloworld
│  │      base_helloworld_example.c
│  │      BUILD.gn
│  │
│  ├─base_01_led
│  │      base_led_example.c
│  │      BUILD.gn
│  │
│  ├─base_02_loopkey
│  │      base_loopkey_example.c
│  │      BUILD.gn
│  │
│  ├─base_03_irqkey
│  │      base_irqkey_example.c
│  │      BUILD.gn
│  │
│  ├─base_04_adc
│  │      base_adc_example.c
│  │      BUILD.gn
│  │
│  ├─base_05_pwm
│  │      base_pwm_example.c
│  │      BUILD.gn
│  │
│  └─base_06_ssd1306
│      │  BUILD.gn
│      │  gif2imgs.py
│      │  img2code.py
│      │  LICENSE
│      │  README.md
│      │  requirements.txt
│      │
│      ├─examples
│      │      BUILD.gn
│      │      ssd1306_demo.c
│      │      ssd1306_tests.c
│      │      ssd1306_tests.h
│      │
│      └─ssd1306
│              BUILD.gn
│              ssd1306.c
│              ssd1306.h
│              ssd1306_conf.h
│
└─doc│  HarmonyOS开发板实验指导书 v2.1.pdf│  华清远见 FS_Hi3861开发指导.md│  华清远见 FS_Hi3861新手入门手册.md│├─board│      FS-Hi3861-V4.2.pdf│      FS-Hi3861QDB-V3.2.pdf│      hi-12f_kit_v1.1.0规格书-20211025.pdf│      hi-12f_v1.1.2-规格书-20211202.pdf│      nodemcu-hi-07s_12f-kit_v1.1-20210913.pdf│      RTplay2.01_A1_2024-06-20.pdf│└─figures

进行编译,编译好如下

烧写进开发板,运行效果如下

http://www.hkea.cn/news/942173/

相关文章:

  • 做中东服装有什么网站免费seo刷排名
  • 做网站用java还是c语言百度竞价推广培训
  • 做动画视频的网站市场监督管理局官网入口
  • 做bbs网站教程军事新闻最新消息今天
  • 在哪儿可以找到网站开发的需求搜索引擎优化介绍
  • 成都网站建设代理加盟网络运营培训班多少钱
  • 太原开发网站公司站长工具端口扫描
  • 域控制网站访问自媒体视频发布平台
  • 广西住房和城乡建设委员会网站湖南网站营销seo多少费用
  • 关键词推广名词解释百度竞价关键词怎么优化
  • 群辉服务器做网站网络优化的内容包括哪些
  • 做淘客的网站岳阳seo
  • 网吧设计方案seox
  • 谁做网站市场营销专业
  • 慈溪外贸公司网站网络营销就业前景和薪水
  • 电商网站建设实训报告长沙网站seo推广公司
  • 阿里云ecs怎么建网站吉林网站seo
  • 企业营销型网站建设的可行性西安竞价托管
  • 做网站如何适应分辨率网站分析培训班
  • 现在币圈有那些私募网站做的好百度推广账号登陆入口
  • 旅游网站图片营销公司排名
  • 做服务器的网站都有哪些搜狗关键词排名此会zjkwlgs
  • php动态网站开发 唐四薪 答案b站引流推广网站
  • 长沙3天2晚自由行攻略论述搜索引擎优化的具体措施
  • 外汇局网站做结汇申报被逆冬seo课程欺骗了
  • 网站运营配置免费网站在线观看人数在哪直播
  • 什么网站做一手房好系统优化的例子
  • wordpress 插入wordseo排名点击工具
  • 网站推广易网宣seo的主要分析工具
  • 安徽网站定制最大免费广告发布平台