Skip to content

Commit 4f2ef76

Browse files
committed
add Unit exmaple sketch comment
1 parent b77a56a commit 4f2ef76

File tree

42 files changed

+306
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+306
-177
lines changed

examples/Unit/ACCEL/ACCEL.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
/*
22
Description: Read ACCEL Unit three-axis acceleration
3-
Please install libraries before compiling:
3+
Please install library before compiling:
44
Arduino-ADXL345: https://github.com/jakalada/Arduino-ADXL345
55
*/
6-
76
#include <M5Stack.h>
87
#include <ADXL345.h>
98
ADXL345 accel(ADXL345_ALT);

examples/Unit/ADC/ADC.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Description: Use ADC Unit to convert 0 ~ 12V analog voltage into 16-bit digital quantity
2+
Description: Use ADC Unit to convert 0 ~ 12V analog voltage into 16-bit data and display it on the screen.
33
*/
44
#include <M5Stack.h>
55
#include <Wire.h>

examples/Unit/ANGLE/ANGLE.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Description: Read ANGLE Unit input analog quantity, and convert to 12-bit digital quantity for display
2+
Description: Read ANGLE Unit input analog quantity, and convert to 12-bit digital quantity for display
33
*/
44

55
#include <M5Stack.h>

examples/Unit/BUTTON/BUTTON.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/*
2+
Description: Read the button status of BUTTON Unit and display it on the screen
3+
*/
14
#include <M5Stack.h>
25

36
int last_value = 0;

examples/Unit/CATEAR/CATEAR.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/*
2-
Please install FastLED library first.
3-
In arduino library manage search FastLED
4-
*/
2+
Description: Control CAT EAR to run rainbow light show
3+
Please install library before compiling:
4+
FastLED: https://github.com/FastLED/FastLED
5+
*/
56
#include <M5Stack.h>
67
#include "FastLED.h"
78

examples/Unit/COLOR/COLOR.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/*
2-
Color test
3-
hardware: M5Stack
4-
5-
please install the Adfruit TCS34725 library first ...
2+
Description: Use COLOR Unit to read C, R, G, B values and serial print output.
3+
Please install library before compiling:
4+
Adafruit TCS34725: https://github.com/adafruit/Adafruit_TCS34725
65
*/
7-
86
#include <Wire.h>
97
#include <M5Stack.h>
108
#include "Adafruit_TCS34725.h"

examples/Unit/CardKB/CardKB.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/*
2+
Description: Read the characters entered by CardKB Unit and display them on the screen.
3+
*/
14
#include <Wire.h>
25
#include <M5Stack.h>
36

examples/Unit/DAC/DAC.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/*
2-
hardware : m5stack uint dac
3-
4-
please install adafruit MCP4725 lib
2+
Description: Use DAC Unit DAC to output 0 ~ 3.3V voltage with an accuracy of 12 bits.
3+
Please install library before compiling:
4+
Adafruit MCP4725: https://github.com/adafruit/Adafruit_MCP4725
55
*/
6+
67
#include <Wire.h>
78
#include <Adafruit_MCP4725.h>
89
#include <M5Stack.h>

examples/Unit/DUAL_BUTTON/DUAL_BUTTON.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
This Unit connects to GRVOE B on M5Core.
2+
Description: Read the button status of DUAL BUTTON Unit and display it on the screen.
33
*/
44
#include <M5Stack.h>
55

examples/Unit/EARTH/EARTH.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/*
2+
Description: Read the analog quantity and digital quantity returned by the EARTH unit, and convert the analog quantity into 12-bit data and display it on the screen.
3+
*/
14
#include <M5Stack.h>
25

36
void setup() {

0 commit comments

Comments
 (0)