2020.1.30VEX 电机学习,函数巩固 心得
大家好,这里是来自乌市一中2023届15班刘翰林的一份学习心得。
Hello, everyone. Here is a learning experience from Henry, Class 15, 2023, Urumqi No.1 senior high School.
今天是训练第五天,所以做个周总结。
Today is the fifth day of training, so I want to make a weekly summary.
总结方面如下:
1.VEX Controller 和 VEX Brain 与电脑连接的常见问题
2.VEX电机编程学习总结
3.函数总结 编程学习
Here are some summary aspects :
- Common problems of VEX Controller and VEX Brain connecting to computer
2.VEX motor programming learning summary - Function programming learning summary
1.VEX Controller 和 VEX Brain 与电脑连接的常见问题
- Common problems of VEX Controller and VEX Brain connecting to computer
首先,遥控器和主控板的连接方式分为有线连接和无线连接。注意的是,在做无线连接的时候,电脑会出现没有连接的情况。
若主控板和遥控器的图标为白色,选择去重新插USB线或者将设备重启、
若主控板的图标为白色,遥控器的图标为橙色,选择去连接遥控器和主控板
若主控板的图标为橙色,遥控器的图标为绿色,选择去重新开启主控板,并重启编程软件。
First of all, the remote control and the main control board are connected by wired connection and wireless connection.
Pay attention to that when you make a wireless connection, the computer will appear disconnected.
If the ICONS of the main control board and remote control are white, choose to replug the USB cable or restart the device,
If the icon of the main control board is white and the icon of the remote control is orange, choose to connect the remote control and the main control board
If the icon of the main control board is orange and the icon of the remote control is green, select to restart the main control board and restart the programming software.
2.VEX电机编程学习总结
2.VEX motor programming learning summary
电机编程分为编程方向(spin),模式(setstopping , settimeout or setVelocity)
(1)方向要和速度结合编程
(2)多用子函数(void命名子函数),主函数中需要编写的大多为马达获取动杆的值。
(3)要设定马达的初始状态(coast最好),为了保护马达
Motor programming is divided into Spin(spin),pattern(Setstopping , SetTimeout or SetVelocity)
(1) direction and speed should be combined with programming
(2) Try to Use subfunction (void named subfunction).Most of the main function needs to be written to obtain the value of the moving rod of the motor.
(3) Set the initial state of the motor (COAST is better), in order to protect the motor
3.函数总结 编程学习
- Function programming learning summary
(1)主函数是进行整个代码的流程,子函数是调用主函数的实际参数,进行该函数的流程
(2)形参是用来定义函数,实参是用来调用函数
(3)函数的调用分为嵌套调用和递归调用
嵌套调用可以理解为俄罗斯套娃,递归调用需要加条件判断,否则将会无终止地进行。
(1) The main function is the process of carrying out the whole code, and the subfunctions are the actual parameters of calling the main function and the process of carrying out the function
(2) Parameters are used to define functions. Arguments are used to call functions
(3) Function calls are divided into nested calls and recursive calls
Nested calls can be thought of as Russian dolls. Recursive calls need to be conditional or they will proceed indefinitely.