Difference between revisions of "NanoHat OLED"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[NanoHat OLED/zh|查看中文]]
 
[[NanoHat OLED/zh|查看中文]]
  
==介绍==
+
==Introduction==
[[File:NanoHat Oled.png|thumb|0.96inch 128x64 OLED]]
+
[[File:DSC_9844-.jpg|thumb|0.96inch 128x64 OLED]]
*NanoHat OLED是一款精致小巧的单色OLED显示屏,只有0.96英寸,分辨率是128x64,对比度高,功耗低,可以用来显示文字或图案。通过I2C和NanoPi NEO通讯。
+
[[File:NanoHat Oled1.png|thumb|0.96inch 128x64 OLED]]
*NanoHat OLED和NanoPi NEO的外形尺寸和接口完全相同,可直接堆叠在NanoPi NEO上使用。
+
[[File:NanoHat Oled2.png|thumb|0.96inch 128x64 OLED]]
*板载了3个按键,用户可以自定义按键功能。板载了2.0mm 4Pin I2C接口插座,可外接其他I2C模块。
+
*NanoHat OLED is a small and cute monochrome OLED module with low power consumption. It is 0.96". Its resolution is 128 x 64. It communicates with a master device with I2C.
 +
*The NanoHat OLED module has the same form factor as FriendlyElec's NanoPi NEO. It can be stacked on a NanoPi NEO.
 +
*It has three onboard programmable user buttons。
 +
*It has an onboard 3.5mm Aduio jack connector and a USB Type A connector.
  
==特性==
+
==Hardware Spec==
* 屏幕尺寸:0.96英寸
+
* LCD Size:0.96"
* 分辨率:128x64
+
* Resolution: 128 x 64
* 高对比度,低功耗
+
* High Contrast, Low Power Consumption
* 板载3个按键
+
* 3 x Onboard Button
* PCB尺寸(mm):40x40
+
* PCB Dimension(mm): 40 x 40
 
[[File:NanoHat OLED.png|frameless|400px|NanoHat OLEDPCB]]
 
[[File:NanoHat OLED.png|frameless|400px|NanoHat OLEDPCB]]
  
* '''GPIO管脚定义'''
+
* '''GPIO Pin Description'''
 
::{| class="wikitable"
 
::{| class="wikitable"
 
|-
 
|-
Line 44: Line 47:
 
|23  || NC ||      ||24    || NC ||  
 
|23  || NC ||      ||24    || NC ||  
 
|}
 
|}
12Pin排针未使用,引脚功能定义在此不列举,请在NanoPi NEO/Air/NEO2维基页面查阅。
+
Only GND and 5V on the 12-Pin land are connected and the rest pins are open. For more details on the 12-Pin connector refer to NanoPi NEO/Air/NEO2's wiki site.
  
==硬件连接==
+
==Hardware Setup==
目前支持的开发板有NanoPi NEO/Air。
+
Currently only the NanoPi NEO, NEO2 and NanoPi NEO Air work with this module.
NanoHat OLED模块和NanoPi NEO/Air尺寸和接口完全相同,可直接堆叠在NanoPi NEO/Air上使用。
+
The NanoHat OLED module has the same form factor as FriendlyElec's NanoPi NEO. It can be stacked on a NanoPi NEO/NEO2/Air.
参考下图连接模块:<br>
+
Here is a hardware setup:<br>
[[File:NanoHat OLED_nanopi_NEO.jpg|frameless|600px|NanoHat OLED_nanopi_NEO]]
+
[[File:NanoHat OLED_nanopi_NEO.jpg|frameless|600px|NanoHat OLED_nanopi_NEO]]<br>
 
+
Applicable Boards:<br />
当前支持的开发板:<br />
+
 
NanoPi NEO<br />
 
NanoPi NEO<br />
NanoPi Fire<br />
+
NanoPi NEO Air<br />
 
NanoPi NEO2<br />
 
NanoPi NEO2<br />
 +
NanoPi NEO Plus2<br />
  
==软件安装==
+
==Run pre-enabled NanoHat-OLED ROM==
NanoHat OLED的演示程序包含在 NanoHatOLED 软件仓库里,在 Ubuntu core系统下,执行以下命令进行安装:<br />
+
::{| class="wikitable"
 +
|-
 +
|Board Type||CPU Model||Download Link to Image File||Image File
 +
|-
 +
|NanoPi NEO|| H3 || [http://download.friendlyelec.com/nanopineo Download]|| official-ROMs/nanopi-neo_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
 +
|-
 +
|NanoPi NEO Air|| H3 ||[http://download.friendlyelec.com/nanopineoair Download] || official-ROMs/nanopi-neo-air_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
 +
|-
 +
|NanoPi NEO Core|| H3 ||[http://download.friendlyelec.com/nanopineocore Download] || official-ROMs/nanopi-neo-core_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
 +
|-
 +
|NanoPi NEO2|| H5 ||[http://download.friendlyelec.com/nanopineo2 Download] || official-ROMs/nanopi-neo2_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
 +
|-
 +
|NanoPi NEO Plus2|| H5 ||[http://download.friendlyelec.com/nanopineoplus2 Download] || official-ROMs/nanopi-neo-plus2_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
 +
|-
 +
|NanoPi NEO Core2|| H5 ||[http://download.friendlyelec.com/nanopineocore2 Download] || official-ROMs/nanopi-neo-core2_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
 +
|-
 +
|}
 +
 
 +
==Enable NanoHat-OLED manually==
 +
There are some code samples for NanoHat OLED. You can get these samples by running the following commands under Ubuntu core:<br />
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
git clone https://github.com/friendlyarm/NanoHatOLED.git
 
git clone https://github.com/friendlyarm/NanoHatOLED.git
Line 65: Line 87:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
<br />
 
<br />
安装脚本会在线下载并安装一系列的软件包,安装时间视网络环境而定,国内用户为了获得更快的安装速度,可以在安装之前先将软件包的源设置为国内源,方法如下:<br />
+
<!---
首先,编辑文件 /etc/apt/sources.list,将里面的内容清空并更改为:<br />
+
The script downloads and installs the samples and some utilities. Mainland Chinese users can download them faster by changing the source:<br />
 +
Open the "/etc/apt/sources.list" file, copy the following lines to replace the existing contents:<br />
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
 
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
Line 79: Line 102:
 
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
 
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
 
</syntaxhighlight>
 
</syntaxhighlight>
然后,编辑(或新建) 文件 $HOME/.pip/pip.conf,将python的pip源设置为国内源,pip.conf内容如下:
+
Or edit(or create) the "$HOME/.pip/pip.conf" file and set Python's pip to a mainland Chinese source. Here is what pip.conf looks like:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
[global]
 
[global]
Line 85: Line 108:
 
index-url = http://mirrors.aliyun.com/pypi/simple
 
index-url = http://mirrors.aliyun.com/pypi/simple
 
</syntaxhighlight>
 
</syntaxhighlight>
完成后成后,执行 sudo apt-get update更新软件包,然后再次执行 ./install.sh 安装脚本安装即可。
+
After these commands are executed run "sudo apt-get update" to update software packages and then run "./install.sh" to begin installation.
 
<br />
 
<br />
 +
--->
  
==演示程序的操作说明==
+
==Run Code Samples==
  
演示程序在安装后会在开机时自动运行,并默认显示 日期与时间 画面。<br />
+
After the code samples are installed they will automatically run on system reboot and display date and time<br />
NanoHat OLED配件上的三个按键功能如下:<br />
+
Here are the definitions of the NanoHat OLED's three user buttons:<br />
K1 -> 显示日期时间; <br />
+
K1 -> Show date & time; <br />
K2 -> 显示开发板的运行状态,例如 IP地址, 负载, 存储状态,CPU温度等信息; <br />
+
K2 -> Show master device's system status: IP address, CPU usage, RAM, CPU temperature and etc; <br />
K3 -> 关机操作,并不会立即关机,而是先弹出询问画面,在询问画面的状态下,用 K1 切换 Yes和No选项,K2进行确认; <br />
+
K3 -> Shutdown. After this button is pressed system will not be shut down immediately but will pop up a Yes/No dialog. Pressing K1 switches between Yes and No, and pressing K2 is to confirm the selection.<br />
 
<br />
 
<br />
  
==相关资料==
+
==Resources==
 +
*[Schematic]([http://wiki.friendlyelec.com/wiki/images/4/4c/Schematic_NanoHat_OLED_v1.4_1804.pdf Schematic NanoHat OLED V1.4 1806.pdf])
 +
*[Schematic]([http://wiki.friendlyelec.com/wiki/images/c/c3/SCHEMATIC_NanoHat_OLED-1703_v1.0.pdf Schematic NanoHat OLED V1.0.pdf])
 +
*[Datasheet]([http://wiki.friendlyelec.com/wiki/images/a/af/096-30-SPEC_QG-2864KLBEG01_VER_C.pdf NanoHat OLED Datasheet.pdf])
 +
 
 +
==Update Log==
 +
===April-27-2017===
 +
* Released English Version
 +
 
 +
===May-25-2017===
 +
* Updated section 4

Latest revision as of 07:17, 21 February 2022

查看中文

1 Introduction

0.96inch 128x64 OLED
0.96inch 128x64 OLED
0.96inch 128x64 OLED
  • NanoHat OLED is a small and cute monochrome OLED module with low power consumption. It is 0.96". Its resolution is 128 x 64. It communicates with a master device with I2C.
  • The NanoHat OLED module has the same form factor as FriendlyElec's NanoPi NEO. It can be stacked on a NanoPi NEO.
  • It has three onboard programmable user buttons。
  • It has an onboard 3.5mm Aduio jack connector and a USB Type A connector.

2 Hardware Spec

  • LCD Size:0.96"
  • Resolution: 128 x 64
  • High Contrast, Low Power Consumption
  • 3 x Onboard Button
  • PCB Dimension(mm): 40 x 40

NanoHat OLEDPCB

  • GPIO Pin Description
Pin# Name Linux gpio Pin# Name Linux gpio
1 SYS_3.3V 2 VDD_5V
3 I2C0_SDA 4 VDD_5V
5 I2C0_SCL 6 GND
7 NC 8 NC
9 GND 10 NC
11 K1 0 12 NC
13 K2 2 14 GND
15 K3 3 16 NC
17 SYS_3.3V 18 NC
19 NC 20 GND
21 NC 22 NC
23 NC 24 NC

Only GND and 5V on the 12-Pin land are connected and the rest pins are open. For more details on the 12-Pin connector refer to NanoPi NEO/Air/NEO2's wiki site.

3 Hardware Setup

Currently only the NanoPi NEO, NEO2 and NanoPi NEO Air work with this module. The NanoHat OLED module has the same form factor as FriendlyElec's NanoPi NEO. It can be stacked on a NanoPi NEO/NEO2/Air. Here is a hardware setup:
NanoHat OLED_nanopi_NEO
Applicable Boards:
NanoPi NEO
NanoPi NEO Air
NanoPi NEO2
NanoPi NEO Plus2

4 Run pre-enabled NanoHat-OLED ROM

Board Type CPU Model Download Link to Image File Image File
NanoPi NEO H3 Download official-ROMs/nanopi-neo_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
NanoPi NEO Air H3 Download official-ROMs/nanopi-neo-air_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
NanoPi NEO Core H3 Download official-ROMs/nanopi-neo-core_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
NanoPi NEO2 H5 Download official-ROMs/nanopi-neo2_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
NanoPi NEO Plus2 H5 Download official-ROMs/nanopi-neo-plus2_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
NanoPi NEO Core2 H5 Download official-ROMs/nanopi-neo-core2_ubuntu-oled_4.x.y_YYYYMMDD.img.zip

5 Enable NanoHat-OLED manually

There are some code samples for NanoHat OLED. You can get these samples by running the following commands under Ubuntu core:

git clone https://github.com/friendlyarm/NanoHatOLED.git
cd NanoHatOLED
sudo -H ./install.sh


6 Run Code Samples

After the code samples are installed they will automatically run on system reboot and display date and time
Here are the definitions of the NanoHat OLED's three user buttons:
K1 -> Show date & time;
K2 -> Show master device's system status: IP address, CPU usage, RAM, CPU temperature and etc;
K3 -> Shutdown. After this button is pressed system will not be shut down immediately but will pop up a Yes/No dialog. Pressing K1 switches between Yes and No, and pressing K2 is to confirm the selection.

7 Resources

8 Update Log

8.1 April-27-2017

  • Released English Version

8.2 May-25-2017

  • Updated section 4