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的更多相关文章

  1. 张高兴的 Windows 10 IoT 开发笔记:使用 ADS1115 读取模拟信号

    考虑到 Raspberry Pi 读取模拟信号是很烦人的事情,更何况是在没人玩的 Windows 10 IoT 下,所以准备正儿八经的写点东西. 需求:使用 Raspberry Pi 读取输出模拟信号 ...

  2. 张高兴的 Windows 10 IoT 开发笔记:使用 Lightning 中的软件 PWM 驱动 RGB LED

    感觉又帮 Windows 10 IoT 开荒了,所以呢,正儿八经的写篇博客吧.其实大概半年前就想写的,那时候想做个基于 Windows 10 IoT 的小车,但树莓派原生不支持 PWM 啊.百度也搜不 ...

  3. 张高兴的 Windows 10 IoT 开发笔记:HC-SR04 超声波测距模块

    HC-SR04 采用 IO 触发测距.下面介绍一下其在 Windows 10 IoT Core 环境下的用法. 项目运行在 Raspberry Pi 2/3 上,使用 C# 进行编码. 1. 准备 H ...

  4. 张高兴的 Windows 10 IoT 开发笔记:BH1750FVI 光照度传感器

    BH1750FVI 是一款 IIC 接口的数字型光强度传感器集成电路.下面介绍一下其在 Windows 10 IoT Core 环境下的用法. 项目运行在 Raspberry Pi 2/3 上,使用 ...

  5. 张高兴的 Windows 10 IoT 开发笔记:部署 ASP.NET Core 2 应用

    今天是大年初二,都去走亲戚了吧,享受一下这难得的能和亲友相聚的时光.而我就不一样了,今天一回到家就又开始瞎折腾了,哈哈哈. 问题背景 最近花了点时间用 ASP.NET Core 2 写了个个人博客,中 ...

  6. 张高兴的 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 ...

  7. 张高兴的 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 ...

  8. 张高兴的 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 ...

  9. 张高兴的 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 ...

随机推荐

  1. [转]微信小程序支付简单小结与梳理

    本文转自:https://www.cnblogs.com/onetwo/p/6667424.html 公司最近在做微信小程序,被分配到做支付这一块,现在对这一块做一个简单的总结和梳理. 支付,对于购物 ...

  2. c#基础学习(0709)之vs通过抽象方法实现多态

    抽象类不能用来实例化对象 1.抽象类中可以有实例成员,也可以有抽象成员 2.抽象成员不能有任何实现 3.抽象类.抽象成员必须包含在抽象类中 4.抽象类不能用来实例化对象,既然抽象类不能被实例化,那么抽 ...

  3. Json.Net 反序列化成匿名对象

    反序列化一个object var str1 = "{id:1,name:'111',x:[1,2,3],y:{a:'ssss',b:'dddd'}"; var obj1 = Jso ...

  4. 常用js-API

    jquery.base64.js //下面是64个基本的编码 var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm ...

  5. The request sent by the client was syntactically incorrect.

    HTTP Status 400 - type Status report message description The request sent by the client was syntacti ...

  6. 在php中怎么利用js把参数传递给弹窗

    1.在php页面中经常用到把参数传递给弹窗页面,在弹窗页面中操作 2.两种方式,截图为一种 3.最常见的就是利用hideen隐藏域,点击按钮的时候把要传递的参数值传递给隐藏域,需要的时候在弹窗中获取. ...

  7. 转-超链接a的target属性

    超链接a的target属性 <a>标签的target意思很明确就是在哪里打开目标文档. 第一种情况: 默认情况:当我们没有设置超链接属性target的value值时默认是_self,即&l ...

  8. linq中如何实现多个条件的联合查询

    目前接触处理数据这一块比较多,在处理内存中的数据源的时候我一般使用的是linq,linq使用起来像sql语句一样,用法简单,功能强大. 最近需要实现一个从两个不同的文件读取不同的数据,然后根据这两个数 ...

  9. Mybatis:使用bean传值,当传入值为Null时,提示“无效的列类型”的解决办法

    问题描述:在使用mybatis对数据库执行更新操作时,parameterType为某个具体的bean,而bean中传入的参数为null时,抛出异常如下:org.mybatis.spring.MyBat ...

  10. Struts2中 Path (getContextPath与basePath)

    struts2中的路径问题是根据action的路径而不是jsp路径来确定,所以尽量不要使用相对路径. 虽然可以用redirect方式解决,但redirect方式并非必要.解决办法非常简单,统一使用绝对 ...