Coder Social home page Coder Social logo

milliwhat / holocubic-firmware Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cweib/holocubic-firmware

0.0 0.0 0.0 14.92 MB

HoloCubic— Firmware

License: GNU Affero General Public License v3.0

C++ 3.15% C 96.66% Makefile 0.01% Processing 0.06% Python 0.12% CMake 0.01% Shell 0.01% Objective-C 0.01%

holocubic-firmware's Introduction

HoloCubic--多功能透明显示屏桌面站

原作者视频介绍: https://www.bilibili.com/video/BV1VA411p7MD/

原作者的Github: https://github.com/peng-zhihui/HoloCubic

制作过程视频: https://www.bilibili.com/video/BV1bN411R7Lx/

1. 固件编译说明

在ino文件中可以直接修其中的数据来显示自己地方的天气和粉丝数:

String  appid = "XXXX";		         //天气API的APPID	 
String  appsecret = "XXXX";		 //天气API的APPSecret
String  cityid = "XXXX";		 //天气API的城市ID  
String  biliid = "XXXX";		 //Bilibili的ID
String  cityname = "XXXX";		 //城市名

天气API的官网地址:https://www.tianqiapi.com (可参考官网教程、查询城市ID等)

其他功能待更新!

玩过Arduino的基本没有上手难度了,把Firmware/Libraries里面的库安装到Arduino库目录(如果你用的是Arduino IDE的话),然后这里需要修改一个官方库文件才能正常使用: 首先肯定得安装ESP32的Arduino支持包(百度有海量教程),然后在安装的支持包的esp32\hardware\esp32\1.0.4\libraries\SPI\src\SPI.cpp文件中,修改以下代码中的MISO为26

if(sck == -1 && miso == -1 && mosi == -1 && ss == -1) {
    _sck = (_spi_num == VSPI) ? SCK : 14;
    _miso = (_spi_num == VSPI) ? MISO : 12; // 需要改为26
    _mosi = (_spi_num == VSPI) ? MOSI : 13;
    _ss = (_spi_num == VSPI) ? SS : 15;

这是因为,硬件上连接屏幕和SD卡分别是用两个硬件SPI,其中HSPI的默认MISO引脚是12,而12在ESP32中是用于上电时设置flash电平的,上电之前上拉会导致芯片无法启动,因此我们将默认的引脚替换为26。

也可以通过设置芯片熔丝的方式解决这个问题,不过那样的操作时一次性的,不建议这么玩。

另外:

Visual Studio的工程,可以在电脑上模拟LVGL的界面效果,改好之后代码粘贴到Arduino固件那边就可以完成界面移植。这样省的每次修改都要重新交叉编译Arduino的固件,提升开发效率。

其他的后续再补充,有用的话记得点星星~

holocubic-firmware's People

Contributors

cweib avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.