|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
Re: Programming IR sensor
I got this from someone else, but this is how you would use the IR board to tell the robot to do something.
Code:
if (GetDigitalInput(1)){
doWhatever();
}
else if (GetDigitalInput(2)){
doSomethingElse();
}
|
|
#3
|
||||
|
||||
|
Re: Programming IR sensor
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 ! ![]() Do you have a VEX robot you can practice on? Last edited by Kingofl337 : 14-01-2008 at 15:26. |
|
#4
|
||||
|
||||
|
Re: Programming IR sensor
We threw our IR board on our VEX and wrote a really, really dirty fast program.
Look at this for a sample. |
|
#5
|
||||
|
||||
|
i love IR sensers i made a simple program take a look i dont have pics but ill write one
BEGIN autonomous Variables PrintToScreen("BEGIN\n"); SetPMW(1,0); SetPMW(2,0); PrintToScreen("END\n"); END ![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming ultrasonic sensor in MPlab | AdamHeard | FIRST Tech Challenge | 1 | 09-05-2006 00:40 |
| Programming the parallax PING))) Ultrasonic Sensor | edman | Programming | 3 | 18-02-2006 23:37 |
| Banner Sensor Programming Problem | 2Crisis | Programming | 4 | 24-02-2004 13:40 |
| autonomous sensor programming ? | Laura_d | Programming | 1 | 10-02-2003 17:46 |
| Tips for Sensor Programming and Testing | EricEnsor | Programming | 3 | 24-01-2003 11:28 |