张高兴的 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 ...
随机推荐
- asdfasdfasdfasdf
- Docker部署golang微服务项目
这篇博客是为了记录一下部署步骤. 因为实训需要,我要在服务器上用docker部署我们小组的微服务项目.我们的微服务有Gateway,User,Scene,Device四个部分,分别占用不同的端口,其中 ...
- 浅谈一致性哈希(My转)
一致性哈希(Consistent hashing)算法是由 MIT 的Karger 等人与1997年在一篇学术论文(<Consistent hashing and random trees: d ...
- Code Signal_练习题_Make Array Consecutive2
Description Ratiorg got statues of different sizes as a present from CodeMaster for his birthday, ea ...
- Json反序列化为动态类型(dynamic)
方法(依赖于Newtonsoft.Json): /// <summary> /// 反序列化json字符串 /// </summary> /// <typeparam n ...
- ulimit命令&pthread_create() error: Resource temporarily unavailable
http://www.ibm.com/developerworks/cn/linux/l-cn-ulimit/ https://my.vertica.com/docs/5.0/HTML/Master/ ...
- Android中的color使用
1.系统颜色 android内置的颜色,比如系统资源中定义的颜色,有以下几个:BLACK(黑色),BLUE(蓝色),CYAN(青色),GRAY(灰色),GREEN(绿色),RED(红色),WRITE( ...
- .hiverc
使用hive cli的时候,会读取.hiverc脚本,在.hiverc脚本里可以做一些自己的预设. 比如: set hive.cli.print.current.db=true; set hive.c ...
- git clone过程中发生的错误
错误提示: 问题原因以及解决方式:http://blog.csdn.net/huihut/article/details/79404421
- wdcpV3面板安装ssl证书 apache教程 子站SSL配置
本帖最后由 q1082121 于 2016-11-24 12:31 编辑 方案二 apache1.把apache类型的ssl三个文件上传到:/www/wdlinux//www/wdlinux/http ...