File tree Expand file tree Collapse file tree 2 files changed +30
-6
lines changed
examples/Modules/StepmotorGRBL13.2_M035 Expand file tree Collapse file tree 2 files changed +30
-6
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- Description: GRBL 13.2 Module TEST Example.Stack two Module at the same time.
2
+ *******************************************************************************
3
+ * Copyright (c) 2021 by M5Stack
4
+ * Equipped with M5Core sample source code
5
+ * 配套 M5Core 示例源代码
6
+ * Visit the website for more information:https://docs.m5stack.com/en/module/stepmotor_driver
7
+ * 获取更多资料请访问:https://docs.m5stack.com/zh_CN/module/stepmotor_driver
8
+ *
9
+ * describe: GRBL 13.2 Module.
10
+ * date:2021/11/14
11
+ *******************************************************************************
12
+ GRBL 13.2 Module TEST Example,use I2C to control stepper motors(Stack two Module at the same time)
13
+ 步进电机模块测试示例,使用I2C控制步进电机(同时堆叠两个模块)
3
14
*/
4
15
#include < M5Stack.h>
5
16
#include " MODULE_GRBL13.2.h"
6
17
7
18
/*
8
19
* The I2C address of GRBL 13.2 Module is 0x70 by default.
20
+ * GRBL 13.2 模块的 I2C 地址默认为 0x70。
9
21
* You could use the DIP Switch for modify I2C address to 0x71
22
+ * 您可以使用拨码开关将 I2C 地址修改为 0x71
10
23
*/
11
24
12
25
#define STEPMOTOR_I2C_ADDR_1 0x70
Original file line number Diff line number Diff line change 1
1
/*
2
- Description: GRBL 13.2 Module TEST Example.
2
+ *******************************************************************************
3
+ * Copyright (c) 2021 by M5Stack
4
+ * Equipped with M5Core sample source code
5
+ * 配套 M5Core 示例源代码
6
+ * Visit the website for more information:https://docs.m5stack.com/en/module/grbl13.2
7
+ * 获取更多资料请访问:https://docs.m5stack.com/zh_CN/module/grbl13.2
8
+ *
9
+ * describe: GRBL 13.2 Module.
10
+ * date:2021/11/14
11
+ *******************************************************************************
12
+ GRBL 13.2 Module TEST Example,use I2C to control stepper motors
13
+ 步进电机模块测试示例,使用I2C控制步进电机
3
14
*/
4
15
#include < M5Stack.h>
5
16
#include " MODULE_GRBL13.2.h"
6
17
7
18
/*
8
19
* The I2C address of GRBL 13.2 Module is 0x70 by default.
20
+ * GRBL 13.2 模块的 I2C 地址默认为 0x70。
9
21
* You could use the DIP Switch for modify I2C address to 0x71
22
+ * 您可以使用拨码开关将 I2C 地址修改为 0x71
10
23
*/
11
24
12
25
#define STEPMOTOR_I2C_ADDR 0x70
@@ -34,10 +47,8 @@ void setup() {
34
47
}
35
48
36
49
void loop () {
37
- /*
38
- If Button A was pressed,
39
- stepmotor will rotate back and forth at a time
40
- */
50
+ // If Button A was pressed,stepmotor will rotate back and forth at a time
51
+ // 如果按下按钮 A,步进电机将一次来回旋转
41
52
if (M5.BtnA .wasPressed ()) // A button
42
53
{
43
54
Serial.print (_GRBL.readStatus ());
You can’t perform that action at this time.
0 commit comments