虚拟神明会发放电子神之眼吗?
Do virtual gods hand out electronic visions?
- 以下库需要手动安装 / Following libraries require manual installation before compile
ArduinoJson 6.21.1
KXTJ3-1057 0.0.1
LovyanGFX 1.1.5
OneButton 2.2.2
- 以下库通过MIT协议随项目分发 / Following libraries are distributed with this project under MIT license
APDS-9930 https://github.com/Depau/APDS9930
LinkedList https://github.com/ivanseidel/LinkedList
LVGL https://github.com/lvgl/lvgl
- 部分代码参考了以下项目 / Some code refer to following projects
RGB565_video https://github.com/moononournation/RGB565_video
esp32_audio https://github.com/atomic14/esp32_audio
该项目为硬件项目璃月神之眼 Extended的对应固件。
项目已同步至Gitee。
固件目前支持以下几种硬件:
- 璃月神之眼 Extended by mr258876
- 神之眼挂件V1.2_ESP32U by 小渣渣
- 璃月神之眼挂件 by 小渣渣 (实验性,未测试)
- 神之眼挂件V1.1 by 小渣渣 (实验性,未测试)
- 显示图片/视频✅
- 设置菜单✅
- 多语言支持✅
- 从米游社API获取树脂✅
- 自动更新✅
- 综合信息界面(数字时钟/天气/树脂数据)✅
- 管理界面(调整设置/远程控制/文件管理)✅
- 恢复模式(应对ROM不足)✅
- 蓝牙🚧
下个大版本中计划的功能:
- 计步器🚧
- 光照-重力传感器联合自动亮度调整🚧
- 1bit DAC音质提升🚧
自0.2.1版本起,神之眼实用程序可用于调整所有配置选项,包括播放列表、米游社配置、天气城市配置等。您可以从设备的设置菜单中启用实用程序后扫描二维码,或者访问设备ip地址进入实用程序。
- 短按两次距离传感器切换元素(切换视频)
- 单击按钮将光标移至下一项
- 双击按钮与按钮进行交互,或与无按钮屏幕进行交互(回到菜单)
- 三击按钮将光标移至上一项,或与无按钮屏幕进行第二交互(切换元素/手动更新树脂数据/切换数字时钟)
- 打开SD卡根目录
Hoyolab.json,并设定玩家id及米游社/Hoyolab cookie。文件格式参考如下:
{
"uid": "100000000",
"cookie": "PLACE YOUR COOKIE HERE 请在此处填写cookie值",
"device_guid": ""
}
device_guid是选填项。其值应为不含短横线的guid,共32位字符。若留空,神之眼将会自动生成该值。- 对于米游社,请打开米游社并登录,随后将以下代码粘贴至浏览器控制台中获取cookie:
let cookie_keys = ['_MHYUUID', 'ltoken', 'ltuid', 'cookie_token', 'account_id'];
var cookie = document.cookie;
var Str_Num = cookie.indexOf('_MHYUUID=');
var cookies = cookie.substring(Str_Num).split('; ');
for(var i = 0; i < cookies.length; i++){
if(!cookie_keys.includes(cookies[i].split("=")[0])){
cookies.splice(i--,1);
}
}
cookie = '"cookie": "' + cookies.join('; ') + '"';
var ask = confirm('按"确认"复制cookie至剪贴板');
if (ask == true) {
copy(cookie);
msg = cookie
} else {
msg = 'Cancel'
}
- 打开SD卡根目录
playFiles.json,并设定视频/图片文件顺序及路径。路径需要以盘符'S'开头。文件格式参考如下:
{
"files": [
"S:/The_Vision_L/Pyro.mjpeg",
"S:/水.mjpeg",
"S:/风.jpg"
]
}
- 您可以在播放列表中放入任意数量的视频/图片,视频长度不受限制。您甚至可以在播放列表中放入多个指向同一视频/图片的项重复播放。
{
"files": [
"S:/水.mjpeg",
"S:/风.jpg",
"S:/风.jpg",
"S:/水.mjpeg"
]
}
- 注意:图片格式需为JPG/JPEG,尺寸240*240且小于12KB,视频格式需为MJPEG,尺寸240*240且每帧小于12KB。
- 注意:JSON语法中不能出现多余逗号。当您确认输入路径无误但仍无法配置播放列表时请检查是否在列表结尾有多余逗号。
- 您可以在mr258876/Genshin-Vision-Videos找到元素视频文件。
- 打开SD卡根目录
Weather.json,设定城市名称、纬度与经度、天气服务提供商。文件格式参考如下:
{
"city":"深圳",
"latitude":22.547,
"longitude":114.085947,
"provider":0
}
- 注意:仅
city项为字符串格式。其他三项数值不要带上引号。 - 目前天气服务提供商仅
Openmeteo可选。请保持provider项为0。 - 您可以在这里查询城市或区县对应坐标。将经度填入
longitude项,纬度填入latitude项。
-
建立串口连接。若使用的主板为开发版,使用Type-C接口直接连接电脑即可,无需额外操作;若使用的主板为普通版,则需使用额外USB-串口转换器,并按下图建立有线连接(以CH341A下载器为例)。

-
移步乐鑫科技网站并下载
ESP Download Tool(Flash下载工具)。 -
当状态显示
完成后,断开串口连接。
- 使用微信AirKiss协议进行配网时,无法使用密码为空的SSID进行配网
- 受米游社风控策略影响,部分情况米游社api会直接返回错误1034。目前的解决办法为在手机上使用米游社app查询体力并签到,随后神之眼上的树脂功能将恢复正常。
- 关于管理API的更多内容,请参阅API参考手册.
如果您在编译过程中遇到库文件报错,请:
- 确认支持库已安装,库路径已正确配置
- 移除Arduino库管理器中的SD/SDMMC库
- 移除Adafruit Zero DMA库 随后重新编译。如果问题依然存在,您可以提起issue以获取帮助。
This is the firmware of hardware project 璃月神之眼 Extended.
These following hardwares are also supported:
- 璃月神之眼 Extended by mr258876
- 神之眼挂件V1.2_ESP32U by 小渣渣
- 璃月神之眼挂件 by 小渣渣 (Experimental, Untested)
- 神之眼挂件V1.1 by 小渣渣 (Experimental, Untested)
- Picture/Video display ✅
- Setting menu ✅
- Multi-language support ✅
- Resin data syncing ✅
- Auto update✅
- Digital clock (with weather) ✅
- Management interface (with remote control & file management) ✅
- Recovery mode (to solve ROM shortage) ✅
Features planned for next major release:
- Bluetooth 🚧
- Short press twice on the distance sensor to switch elements (switch video)
- Click power button to move cursor to next item
- Double-click power button to interact with a button item, or to interact with a buttonless screen (go back to menu)
- Triple-click power button to move cursor to previous item, or perform second interaction with a buttonless screen (switch element / update resin data manually / switch between digital clock & analog clock)
- Open
Hoyolab.jsonin SD card root directory, then set character id and Hoyolab cookie. Example shown as below:
{
"uid": "100000000",
"cookie": "PLACE YOUR COOKIE HERE 请在此处填写cookie值",
"device_guid": ""
}
device_guidis optional. It should be a random generated guid without dash line, 32 characters in total. The vision will generate one if left blank.
- Open
playFiles.jsonin SD card root directory, then set the path and sequence of videos and pictures. The paths need include driver letter 'S'. Example shown as below:
{
"files": [
"S:/The_Vision_L/Pyro.mjpeg",
"S:/水.mjpeg",
"S:/风.jpg",
]
}
- You can put as many videos/pictures as you want in your playlist. You can even put multiple paths pointing to the same video/picture in your playlist to play repeatedly.
{
"files": [
"S:/水.mjpeg",
"S:/风.jpg",
"S:/风.jpg",
"S:/水.mjpeg"
]
}
- Note: The format of pictures should be JPG/JPEG, with size 240px*240px, file size less than 12KB; videos should be MJPEG, size 240px*240px, less than 12 KB for each frame.
- Note: Extra commas are not acceptable in JSON syntax. When you are sure about the paths but still getting errors, check whether there is any extra comma at the end of the list.
- You could find the element videos at mr258876/Genshin-Vision-Videos.
- Open
Weather.jsonin SD card root directory, set the city name, latitude & longitude, and weather service provider. Example shown as below:
{
"city":"Shenzhen",
"latitude":22.547,
"longitude":114.085947,
"provider":1
}
- Note: Only
cityentry is in string. Do not quote the other three values. - Only
Openmeteoavaliable as weather provider for now, please keepprovideras0. - You can check the coordinates of your location here.
-
Setup serial connection with the vision. If using a development version board, just connect the vision with a Type-C wire, no further operations required; otherwise you need a USB-TTL dongle, and setup the connection as shown (e.g. connect using a CH341A downloader).

-
Move to Espressif Systems and download
ESP Download Tool (Flash Download Tool)。 -
Open ESP Download Tool,select
ESP32for chip type,developmentfor work mode.

-
Set the files, flash address, flash speed according to the figure below. Set serial port and download speed according to the actual situation.

-
Click
Download. If not using a development version board, short press the EN key while holding the BOOT key. If the status always showssync, repeat this step.

-
Disconnect when the status shows
Finish.
- Rename
firmware.bintoupdate.binand place it in the SD card root directory.

- Insert SD card back in, the vision will start update automatically.

- Failure on wifi configuration through Wechat AirKiss protocol using SSID without password
- Affected by the risk control policy of Hoyoverse, the API directly returns error code 1034 in some cases. Current solution is to use Hoyolab app on your phone and check your resin, then the resin function on the vision should behave normally.
- Please reference to API Refernece Manual for more details about the management APIs.
If you encounter errors during compilation, please:
- Confirm the referenced libraries are installed and library paths are configured correctly
- Remove SD/SDMMC libraries from Arduino Library Manager
- Remove the Adafruit Zero DMA library Then try recompile. If problem still exists, bring up an issue for help.
