Programming IR sensor

how do you program the IR sensor to alter the way the robot moves in EasyC?
I dont see an IR sensor block! Can you make blocks?

Also one other question: Is it possible to convert the 2007 default code into blocks?

Thanks in advance.

I got this from someone else, but this is how you would use the IR board to tell the robot to do something.

if (GetDigitalInput(1)){
else if (GetDigitalInput(2)){

change the number in GetDigitalInput to whatever to fit your needs. Good Luck!

Correct you use the digital input block.

The idea behind easyC is you don’t need default code you can make your own default code with like 3 blocks.
I would recommend going through the “Getting Started” section of the help file buy the time you finish you should
be an easyC Jedi ! :slight_smile:

Do you have a VEX robot you can practice on?

We threw our IR board on our VEX and wrote a really, really dirty fast program.

Look at this for a sample. (19.9 KB) (19.9 KB)

i love IR sensers i made a simple program take a look i dont have pics but ill write one
:] :ahh: :yikes: :rolleyes: