Difference between revisions of "NanoHat OLED for NanoPi NEO2 Black/zh"
Line 77: | Line 77: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<br /> | <br /> | ||
− | + | Running the installation script will download necessary packages. You can set the download source to your preferred one to speed up the process. To change the download source run the following command:<br /> | |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
wget http://112.124.9.243/aptsouce.sh | wget http://112.124.9.243/aptsouce.sh | ||
Line 84: | Line 84: | ||
sudo apt-get update | sudo apt-get update | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | After the download steps are done run the "NanoHatOLED的 ./install.sh" script to install them. | |
<br /> | <br /> | ||
Revision as of 08:37, 7 January 2020
Contents
1 Introduction
- The NanoHat OLED for NanoPi NEO2 Black module is a monochrome OLED module designed and developed for the NanoPi NEO2 Black. It is 0.96" and the resolution is 128 x 64. It has high contrast and low power-consumption. It can display characters and images. It communicates with a NanoPi NEO2 Black with I2C.
- The size of the NanoHat OLED for NanoPi NEO2 Black is the same as the size of the NanoPi NEO2 Black. The OLED module can be stacked onto a NanoPi NEO2 Black.
- The module has three programmable keys.
- The module has a 3.5mm audio jack and a USB Type A port.
2 Hardware Spec
- Size: 0.96"
- Resolution: 128 x 64
- High contrast and low power consumption
- 3 x onboard key
- PCB dimension(mm): 40 x 40
- GPIO1(I2C/UART/GPIO)
Pin# Name Linux gpio Pin# Name Linux gpio 1 GPIOA0 0 2 5V in or out - 3 I2C_SDA0 - 4 5V in or out - 5 I2C_SCL0 - 6 GND - 7 GPIOA2 2 8 UART1_TX - 9 GND - 10 UART1_RX -
- GPIO2(USB/Audio OUT)
Pin# Name Linux gpio Pin# Name Linux gpio 1 Line out Right - 2 USB DM - 3 Line out Left - 4 USB DP - 5 Audio GND - 6 GPIOA3 3
3 Applicable Board & OS
Index | CPU Model | Board Type | OS |
1 | H5 | NanoPi NEO2 Black | Open Source Linux-4.x Mainline Kernel |
4 Hardware Setup
The size of the NanoHat OLED for NanoPi NEO2 Black is the same as the size of the NanoPi NEO2 Black. The module can be stacked onto a NanoPi NEO2 Black.
Here is a hardware setup:
5 ROM That Enables Support for NanoHat OLED for NanoPi NEO2 Black
Board Type CPU Model Download Link to Image File Image File NanoPi NEO2 Black H5 Download official-ROMs/accessory-ROMs/nanopi-neo2-black_ubuntu-oled_4.x.y_YYYYMMDD.img.zip
6 Manually Enable Support for NanoHat OLED for NanoPi NEO2 Black
FriendlyElec developed code samples for the NanoHat OLED for NanoPi NEO2 Black and these code samples are contained in the NanoHatOLED's github. You can download and install these code samples by running the following commands after you boot a NanoPi NEO2 Black:
git clone https://github.com/friendlyarm/NanoHatOLED.git cd NanoHatOLED sudo -H ./install.sh
Running the installation script will download necessary packages. You can set the download source to your preferred one to speed up the process. To change the download source run the following command:
wget http://112.124.9.243/aptsouce.sh chmod 755 aptsouce.sh sudo -H ./aptsouce.sh sudo apt-get update
After the download steps are done run the "NanoHatOLED的 ./install.sh" script to install them.
7 演示程序的操作说明
演示程序在安装后会在开机时自动运行,并默认显示 日期与时间 画面。
NanoHat OLED配件上的三个按键功能如下:
K1 -> 显示日期时间;
K2 -> 显示开发板的运行状态,例如 IP地址, 负载, 存储状态,CPU温度等信息;
K3 -> 关机操作,并不会立即关机,而是先弹出询问画面,在询问画面的状态下,用 K1 切换 Yes和No选项,K2进行确认;
8 相关资料
- [Schematic](NanoHat_OLED_for_NanoPi_NEO2_Black原理图pdf文件)
- [Dimension](NanoHat_OLED_for_NanoPi_NEO2_Black_PCB的DXF文件)
- [Datasheet](NanoHat OLED Datasheet.pdf)