VRC Change Up 2020-2021 Dev Log

VRC Change Up 2020-2021 Dev Log

I will record every time of club activity here, normally once a week, regarding coding log and other working tasks.
repo: vexcode_changeup

05/31/20


Summary

Today we officially began our new season robotics development. To be honest, I have less time available this season due to my SAT and TOEFL exam and college application stuff. However, I want to insist on this activity which I’ve already participated since my middle school. My job will gravitate mainly on programming.

Plus, we move to a brand new activity room with double area and completely new equipment and match field. Hope I can achieve some accomplishments that I left as pities last season.

So sad that today I am alone in my team. They are all busy preparing AP makeup exams, although I also need to retake.

Task List

  • Get started and familiar with code formatting and competition template again.
  • Recode and design my code format and template.
  • Finish the entire base program with optimization
Read more
My first VEX tournament of the season

My first VEX tournament of the season

Now I am on the bullet train from Xi’an to Baoding, crossing one tunnel after another, passing one bridge after another. Just a few minutes ago, I was sleeping deeply, but now I think I am conscious.

Sleepless night


From the beginning of the summer vacation, I was studying TOEFL everyday following a regular routine – getting up at 7AM, doing TOEFL practice all the day and then going to bed at 11PM.

However, Last night even didn’t close my eyes for a while because of the unfinished autonomous program. It’s a hard and harsh work putting tons of parameters and variables to my mind simultaneously. Fortunately, with my team members Tony and Jessica helping me reset the match field quickly and accurately, finally I got it. Never forget the colorful cubes leaps on the match field which seem to lose control.

Nervous time


To be honest, I didn’t put too many efforts in the VEX competition these summer vacation. I just came to participate in training two days before our setting off. I am really awkward to my excellent team member and coach Mr. Han.

The robot that will be used in the competition hadn’t been finished two days before. Our manipulator Tony hadn’t practice controlling the robot like catching the cube and pile them up in the specific area which is not easy and definitely needs time to be familiar with the way of controlling.

Luckily, we had done everything in time under the unity of our team which is the most valuable and precious thing I got from the robot club. I saw everyone mounting screw carefully, writing engineer log amazingly… There exists many good personalities and characters that I need to learn from them.

Read more
VEX programming tips

VEX programming tips

使用万能的电机控制自定义函数

由于电机的端口是一个motor类型的变量,所以我们可以将电机当作变量传参。

模板

1
2
3
4
5
void m(motor motorname,int speed=100,int tor=100) //定义一个名为m的函数,三个参数分别是电机端口、速度(默认100)、力矩(默认100)。
{
motorname.setMaxTorque(tor,percentUnits::pct);
motorname.spin(directionType::fwd,speed,percentUnits::pct);
}

实例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 底盘四个电机全功率向前1000ms
using namespace vex;
void test()
{
//四个电机同时以速度100,力矩100向前
m(MotorLF,100,100);
m(MotorLB,100,100);
m(MotorRF,100,100);
m(MotorRB,100,100);
//延时1000ms
task::sleep(1000);
//四个电机同时停
m(MotorLF,0);//由于在这里(一般情况下)力矩默认都为100,所以可以直接不传入力矩这个参数,跳过即可)
m(MotorLB,0);
m(MotorRF,0);
m(MotorRB,0);
}