Git Product home page Git Product logo

printer's Introduction

printer

嵌入式创新实践项目——便携式热敏打印机 from SCUT


00-写在前面

便携式热敏打印机是一种方便手持和外出携带的打印设备,通过手机蓝牙连接和配套的手机应用程序,可以实现用户对便利贴,图片,错题,To-Do-List 等内容的打印需求。本项目参考B站up主【小智学长】的项目进行软件开发,旨在提升自己的嵌入式开发能力,同时也是为了完成学校的课程任务。

01-软硬件平台

  • 主控芯片:ESP32-WROOM
  • 软件组织:FreeRTOS
  • 上位机软件:基于 Kotlin 的 Android 开发

02-代码文件目录及简要说明

代码文件都放在src/目录下,在该目录下又分成三个目录,下面分别介绍各目录下的文件结构:

  • global(存放跟全局配置和任务有关的程序文件)

    • config.h(引脚定义和参数配置文件)
    • device.cpp,device.h(设备状态设置文件)
    • task.cpp,task.h(用户多任务函数定义文件,实现了打印,状态上报,按键等多个任务)
  • hal(存放硬件相关的驱动程序文件)

    • adc.cpp,adc.h(ADC相关的驱动程序,实现温度和电量检测)
    • ble.cpp,ble.h(蓝牙相关的驱动程序,实现蓝牙连接和数据收发等具体事宜)
    • button.cpp,button.h(按键驱动程序,实现按键的单击,双击,长按等事件的检测)
    • led.cpp,led.h(LED灯的驱动程序,可以实现对LED灯亮灭的控制)
    • motor.cpp,motor.h(步进电机驱动程序,对步进电机的启动和停止进行控制)
    • my_hal.cpp,my_hal.h(设备硬件状态检测程序,封装了检测电量,温度和缺纸等状态的接口)
    • printer.cpp,printer.h(打印头的驱动程序,实现对打印功能的控制)
    • spi.cpp,spi.h(SPI驱动程序)
    • timer.cpp,timer.h(定时器配置相关,配置了定时上报设备状态和打印超时两个定时器的工作参数)
  • utils(存放一些常用的接口函数)

    • queue.cpp,queue.h(实现了一个共享队列,利用互斥量对队列数据资源在多任务之间进行共享)

03-相关的资料

printer's People

Contributors

jc-yu avatar

Watchers

 avatar

Forkers

zhjrate pcdeng

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.