Giter Club home page Giter Club logo

power-example's Introduction

Power-Management-HAT-B

Power Management HAT (B) Example code

Example

1. Button_Ctr

  • Power on or off by the PWR button
  1. If Raspberry Pi is off
    • Press PWR button to start Raspberry Pi
  2. If Raspberry Pi is on
    • Long-press PWR button for 2s~8s, Raspberry Pi will be first software shutdown and then cut off power
    • Long-press PWR button for more than 8s to directly cut off power of Raspberry Pi.

2. Period_Time

  • Power on or off by Period_Time
  1. Power on when Power_On_Time(default 9:00:30)
  2. Power off when Power_Off_Time (default 10:00:00)

3. Cycle

  • Power on or off by Cycle
  1. Power_On_Keep_Time(default 1800S)
  2. Power_Off_Keep_Time(default 3600S)

Version Description

V1.0

  • First release

V1.1

  • Add cycle function, default:turning on 1800S and turning off 3600s
  • Fix the issue where STA did not wait when the timing switch was started for the first time
  • Add Readme Description

Power-Management-HAT-B

Power Management HAT (B) Example code

Example

1. Button_Ctr

  • 使用PWR按键开关机
  1. 当树莓派关机
    • 按下PWR按键则开机
  2. 当树莓派开机
    • 长按PWR按键超过2S但不到8S,尝试将树莓派软关机
    • 长按PWR按键超过8S则尝试直接掐断电源

2. Period_Time

  • 定时开关机
  1. 当时间到达指定时间Power_On_Time(默认为 9:00:30)时开机
  2. 当时间到达指定时间Power_Off_Time (默认为 10:00:00)时关机

3. Cycle

  • 循环开关机
  1. 保持开机时间Power_On_Keep_Time(默认为1800S)
  2. 保持关机机时间Power_Off_Keep_Time(默认为3600S)

版本描述

V1.0

  • 初次提交

V1.1

  • 增加 循环开关机功能,默认开机1800S,关机3600S
  • 修复定时开关机 初次开机STA没有等待的问题
  • 增加readme描述

power-example's People

Contributors

engineerwill avatar xushengfeng avatar

Watchers

 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.