# oled
**Repository Path**: zhkumsg/oled
## Basic Information
- **Project Name**: oled
- **Description**: oled
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2023-10-07
- **Last Updated**: 2023-10-29
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 使用 oled 显示屏查看IP地址
## 1. 参考图片安装 oled 显示屏(树莓派开机前安装)
## 2. `putty` 执行 `ssh`,远程登录树莓派(可以使用手机热点,使用`root`登陆)
```bash
ssh root@ipxxx
```
## 3. 下载可执行文件 `oled`(已提前放到 gitee 进行托管)
```bash
# 进入约定目录
cd /usr/local/bin
# 下载程序
wget https://gitee.com/zhkumsg/oled/releases/download/oled/oled
# 赋予可读可写权限
sudo chmod 777 ./oled
# 查看文件
ls
```
## 4. 配置开机自启
```bash
# 进入约定目录
cd /usr/lib/systemd/system
# 下载配置
wget https://gitee.com/zhkumsg/oled/releases/download/service/oled.service
# 启动服务
sudo systemctl start oled
# 开机自启(每次开机都会执行第三步到oled可执行文件)
sudo systemctl enable oled
```
此时 `显示屏` 会显示时间和IP信息,后续每次开机后都会显示IP信息
PS:如果既连接了WIFI,又连接了网线,这时候两个网卡会启动,也就是会有两个IP地址