EasyC programming question

Hey guys.

I am Eric from a two-week-old team (we literally had just established a new team very recently), and I decided EasyC would be the quickest route to run for such a short amount of learning adapting time before the SkillUSA competition.

I would like to have certain functions or statements in the program that could read Controller’s value, so the robot can detect when certain buttons are pressed and held down. So far EasyC cortex, to me, is a block building program, and it is not very flexible (which is frustrating), and the statement that comes with each defined block is a series of numbers in curly braces, which tells me, as a programmer, nothing but a set of hidden data. I have been scrolling through the list of blocks, but none seem to be able to pull such data. Is there a way for me to be able to tell when certain buttons in the controller being pressed in EasyC Cortex block programming?

Thank you in advance, sorry for such a newbie question.

How I would do it in EasyC:
Define a variable int named “button”
Scroll over to the joystick tabs and drag “get joystick digital”
Then you relate the variable “button” with the desired button on the joystick (For Example 8U)
you can then use an if statement to call any command you want
if( button == 1)
{
insert task
}

I’m sure you are aware that there is a 3/11 update to the SkillsUSA Mobile Robotics rules which removes the requirement to use EasyC. SkillsUSA still has a bias towards EasyC, but you are free to use RobotC or another language of your choice. That being said, everything is much more flexible to program in any language other than EasyC. If you have access to RobotC, the robotc.net tutorial videos will get you up and running in no time.

My team of sophomores finished 2nd in Texas and are looking forward to winning it before they graduate. I think we might have been the only team using RobotC, which was a huge advantage. We are using our SkillsUSA bot as a training partner for VEX Worlds. We will be bringing it to Worlds if anyone wants to see what can be built in four weeks with just a VEX super kit.

To 2382: Thank you for replying. The program works really well.

To Jobe: according to the rule of the competition in Nevada, they recommended me to use EasyC V4 Cortex and EasyC V5 for IQ/Cortex. But thank you for informing me, I wouldn’t have known if you haven’t tell me anything.