Wednesday, April 6, 2016
Learning Examples
My robotics class and I recently went to a robotics competition for Vex. We used a robot C code for the competition. Coding is not for everyone, to give an example, this is 1/5 of our code:
task main()
{
if (vexRT[7U] == 1);
{
motor[leftliftmotor] = 67;
}
if else (vexRT[7D] == 1);
{
motor[leftliftmotor] = -67;
}
else
{
if (vexRT[5U] == 1);
{
motor[leftliftmotor] = 67;
motor[rightliftmotor] = 67;
}
if else (vexRT[5D] == 1);
{
motor[leftliftmotor] = -67;
motor[rightliftmotor] = -67;
}
else
{
motor[leftliftmotor] = 0;
motor[rightliftmotor] = 0;
}
}
}
This is for you to make sure that before you choose to learn this, you understand what will be placed in front of you.
Coding is not for everyone but even if you don't want to code as an occupation, it looks great on a resume and is actually very useful. I hope you enjoyed, feel free to ask questions or make requests.
Subscribe to:
Post Comments (Atom)
Nice idea!!!! Will you be posting video coding tutorials? Looking forward!!!!
ReplyDeleteGreat idea. I will try to make that happen.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete