Skip to content

Commit

Permalink
add license
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitshaoxiang committed Aug 9, 2023
1 parent 1ff9438 commit 0e01781
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/Arduino-Lint-Check.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Arduino Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
name: Lint Check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/arduino-action-paper-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- '**.cpp'
- '**.h'
- 'arduino-test-compile.sh'
- 'action.yml'
- '*.yml'
workflow_dispatch:
jobs:
build:
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 M5Stack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[![Arduino Compile](https://github.com/m5stack/M5EPD/actions/workflows/arduino-action-paper-compile.yml/badge.svg)](https://github.com/m5stack/M5EPD/actions/workflows/arduino-action-paper-compile.yml)
[![Arduino Lint](https://github.com/m5stack/M5EPD/actions/workflows/Arduino-Lint-Check.yml/badge.svg)](https://github.com/m5stack/M5EPD/actions/workflows/Arduino-Lint-Check.yml)
[![Clang Format](https://github.com/m5stack/M5EPD/actions/workflows/clang-format-check.yml/badge.svg)](https://github.com/m5stack/M5EPD/blob/main/.github/workflows/clang-format-check.yml)
[![Clang Format](https://github.com/m5stack/M5EPD/actions/workflows/clang-format-check.yml/badge.svg)](https://github.com/m5stack/M5EPD/actions/workflows/clang-format-check.yml)


English | [中文](README_cn.md)
Expand Down
2 changes: 1 addition & 1 deletion README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Arduino Compile](https://github.com/m5stack/M5EPD/actions/workflows/arduino-action-paper-compile.yml/badge.svg)](https://github.com/m5stack/M5EPD/actions/workflows/arduino-action-paper-compile.yml)
[![Arduino Lint](https://github.com/m5stack/M5EPD/actions/workflows/Arduino-Lint-Check.yml/badge.svg)](https://github.com/m5stack/M5EPD/actions/workflows/Arduino-Lint-Check.yml)
[![Clang Format](https://github.com/m5stack/M5EPD/actions/workflows/clang-format-check.yml/badge.svg)](https://github.com/m5stack/M5EPD/blob/main/.github/workflows/clang-format-check.yml)
[![Clang Format](https://github.com/m5stack/M5EPD/actions/workflows/clang-format-check.yml/badge.svg)](https://github.com/m5stack/M5EPD/actions/workflows/clang-format-check.yml)

[English](README.md) | 中文

Expand Down
10 changes: 6 additions & 4 deletions examples/Unit/KEY/KEY.ino
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ void changeLedColor();

void setup() {
M5.begin(); // Init M5Stack 初始化M5Stack
M5.EPD.SetRotation(
90); // Set the rotation of the display. 设置屏幕旋转角度
// Set the rotation of the display. 设置屏幕旋转角度
M5.EPD.SetRotation(90);

M5.EPD.Clear(true); // Clear the screen. 清屏
M5.RTC.begin(); // Init the RTC. 初始化 RTC
canvas.createCanvas(540, 960); // Create a canvas. 创建画布
canvas.setTextSize(3); // Set the text size. 设置文字大小
canvas.drawString("UNIT-KEY Example", 135,
350); // Draw a string. 绘制字符串

// Draw a string. 绘制字符串
canvas.drawString("UNIT-KEY Example", 135, 350);
canvas.pushCanvas(0, 0, UPDATE_MODE_DU4); // Update the screen. 更新屏幕

pinMode(KEY_PIN, INPUT_PULLUP); // Init Key pin. 初始化Key引脚.
Expand Down
8 changes: 5 additions & 3 deletions examples/Unit/LIMIT/LIMIT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ M5EPD_Canvas canvas(&M5.EPD);

void setup() {
M5.begin(); // Init M5Stack 初始化M5Stack
M5.EPD.SetRotation(
90); // Set the rotation of the display. 设置屏幕旋转角度

// Set the rotation of the display. 设置屏幕旋转角度
M5.EPD.SetRotation(90);
M5.EPD.Clear(true); // Clear the screen. 清屏
M5.RTC.begin(); // Init the RTC. 初始化 RTC
canvas.createCanvas(540, 960); // Create a canvas. 创建画布
canvas.setTextSize(3); // Set the text size. 设置文字大小

canvas.drawString("UNIT-LIMIT Example", 110,
350); // Draw a string. 绘制字符串
350); // Draw a string. 绘制字符串
canvas.pushCanvas(0, 0, UPDATE_MODE_DU4); // Update the screen. 更新屏幕

Serial.begin(115200);
Expand Down

0 comments on commit 0e01781

Please sign in to comment.