张高兴的 Windows 10 IoT 开发笔记:0.96 寸 I2C OLED
This is a Windows 10 IoT Core project on the Raspberry Pi 2/3, coded by C#.
GitHub:https://github.com/ZhangGaoxing/windows-iot-demo/tree/master/OLED
Image
Connect
- SDA - Pin3
- SCL - Pin5
- VCC - 5V
- GND - GND
Reference
https://github.com/ZhangGaoxing/windows-iot-demo/tree/master/OLED/Reference
What Contains
In OLED.cs file
/// <summary>
/// Initialize the OLED
/// </summary>
public async Task InitializeAsync();
/// <summary>
/// Show character on OLED
/// </summary>
/// <param name="x">x-coordinate</param>
/// <param name="y">y-coordinate / 8 !!!</param>
/// <param name="width">Character Width</param>
/// <param name="height">Character Height</param>
/// <param name="charData">Character Data (common-cathode, column-row, and reverse ou
public void ShowChar(int x, int y, byte width, byte height, byte[] charData);
/// <summary>
/// Send command
/// </summary>
/// <param name="command">Command</param>
private void WriteCommand(byte command);
/// <summary>
/// Send the data which you want to show on the OLED
/// </summary>
/// <param name="data">Data</param>
public void WriteData(byte data);
/// <summary>
/// Set start point (cursor)
/// </summary>
/// <param name="x">x-coordinate</param>
/// <param name="y">y-coordinate / 8 !!!</param>
public void SetPoint(int x, int y);
/// <summary>
/// Fill the OLED with data (input 0xFF to fill, 0x00 to clear)
/// </summary>
public void FillScreen(byte data1, byte data2);
/// <summary>
/// Cleanup
/// </summary>
public void Dispose();
/// <summary>
/// Init command
/// </summary>
private void InitCommand();
How to Use
- First, you need to create a OLED object. After that you should call InitializeAsync() to initialize.
OLED oled = new OLED();
await oled.InitializeAsync();
- Secondly
oled.ShowChar(0, 0, 16, 16, bytes);
- If you want to close the sensor, call Dispose().
oled.Dispose();
张高兴的 Windows 10 IoT 开发笔记:0.96 寸 I2C OLED的更多相关文章
- 张高兴的 Windows 10 IoT 开发笔记:使用 ADS1115 读取模拟信号
考虑到 Raspberry Pi 读取模拟信号是很烦人的事情,更何况是在没人玩的 Windows 10 IoT 下,所以准备正儿八经的写点东西. 需求:使用 Raspberry Pi 读取输出模拟信号 ...
- 张高兴的 Windows 10 IoT 开发笔记:使用 Lightning 中的软件 PWM 驱动 RGB LED
感觉又帮 Windows 10 IoT 开荒了,所以呢,正儿八经的写篇博客吧.其实大概半年前就想写的,那时候想做个基于 Windows 10 IoT 的小车,但树莓派原生不支持 PWM 啊.百度也搜不 ...
- 张高兴的 Windows 10 IoT 开发笔记:HC-SR04 超声波测距模块
HC-SR04 采用 IO 触发测距.下面介绍一下其在 Windows 10 IoT Core 环境下的用法. 项目运行在 Raspberry Pi 2/3 上,使用 C# 进行编码. 1. 准备 H ...
- 张高兴的 Windows 10 IoT 开发笔记:BH1750FVI 光照度传感器
BH1750FVI 是一款 IIC 接口的数字型光强度传感器集成电路.下面介绍一下其在 Windows 10 IoT Core 环境下的用法. 项目运行在 Raspberry Pi 2/3 上,使用 ...
- 张高兴的 Windows 10 IoT 开发笔记:部署 ASP.NET Core 2 应用
今天是大年初二,都去走亲戚了吧,享受一下这难得的能和亲友相聚的时光.而我就不一样了,今天一回到家就又开始瞎折腾了,哈哈哈. 问题背景 最近花了点时间用 ASP.NET Core 2 写了个个人博客,中 ...
- 张高兴的 Windows 10 IoT 开发笔记:串口红外编解码模块 YS-IRTM
This is a Windows 10 IoT Core project on the Raspberry Pi 2/3, coded by C#. GitHub: https://github.c ...
- 张高兴的 Windows 10 IoT 开发笔记:无线收发芯片 nRF24L01
This is a Windows 10 IoT Core project on the Raspberry Pi 2/3, coded by C#. GitHub:https://github.co ...
- 张高兴的 Windows 10 IoT 开发笔记:FM 电台模块 KT0803L
This is a Windows 10 IoT Core project on the Raspberry Pi 2/3, coded by C#. GitHub:https://github.co ...
- 张高兴的 Windows 10 IoT 开发笔记:使用 MAX7219 驱动数码管
This is a Windows 10 IoT Core project on the Raspberry Pi 2/3, coded by C#. GitHub:https://github.co ...
随机推荐
- msdn 中MethodBase.Invoke 方法 介绍中的坑
模块开发总结: c#动态调用webservices 来自网络及使用心得. msdn: MethodBase.Invoke 方法 (Object, Object[]) 使用指定的参数调用当前实例所表示的 ...
- [C语言] 数据结构-预备知识动态内存分配
动态内存分配 静态内存分配数组 int a[5]={1,2,3,4,5} 动态内存分配数组 int len=5; int *parr=(int *)malloc(sizeof(int) * len) ...
- MySQL7:性能优化
性能优化 优化MySQL数据库是数据库管理员和数据库开发人员的必备技能.MySQL优化,一方面是找出系统的瓶颈,提高MySQL数据库的整体性能:一方面需要合理的结构设计和参数调整,以提高用户操作响应的 ...
- Storm框架:如何实现crontab定时任务
Storm除了能对消息流进行处理,还能实现crontab定时任务. 只要在bolt中配置TOPOLOGY_TICK_TUPLE_FREQ_SECS项即可实现. @Override public Map ...
- Yii 时间戳格式化显示的问题
这个控件是CJuiDatePicker控件的扩展,支持时分秒. 下载地址:http://www.yiiframework.com/extension/timepicker/ 这个控件用在view里的_ ...
- js面向对象设计之class中一些坑和技巧
this的指向 super 类工厂,类中定义方法名时,可以使用字符串,这就可以创建工厂函数(类似模板类) Generator 函数 静态属性和私有属性.私有方法 new.target
- com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/NOTICE
在将vivo eclipse sdk 迁移 android studio 时候报错 Error:Execution failed for task ':vivosdk:transformResour ...
- Android平台接入Facebook登录
官方教程地址: https://developers.facebook.com/docs/android/getting-started 开发环境为Android Studio,官方要求SDK最低版本 ...
- Object toString方法
1.System.out.println()里的参数会自动调用toString方法. package com.mydemo.controller; // 1.getClass().getName() ...
- Oracle数据库日期格式转换操作
1. 日期转化为字符串 (以2016年10月20日为例) select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') strDateTime from dual; ...