I am having problems getting the HiTech IRLink to work. I am using Xander's driver.

My setup is very simple. I have the IRLink connected to sensor port 3. It is looking directly at a PF IR Receiver, which is running a medium PF motor. I am using the standard PF battery pack. (non-rechargable). The IR receiver is set to address 1.

When I use the standard hand-held PF controller, it works fine: I can run the motor forwards and backwards using the hand-held control. However, when I run the simple test program whose source code is shown below, I get no response from the IR receiver (no blinking light) and no motor action.

Please, IR gurus, take a peek at this short program and give me a clue as to where I might be going wrong. I am runningRobotC version 1.91B. As you can see, I have this configured to run both motors, even though only a single motor is connected to the IR receiver. I have tried the motor in both the blue and red ports to no avail.

I think what may have happened is that you've got the IR channel configured for 1 on your receiver when your code is transmitting on channel 2. Remember that channel numbers go from 0 to 3, not 1 to 4. You can see this when you take a look at the example ([LINK]). I will update the documentation regarding this numbering for the next release.

Also, it is important to note that my drivers DO NOT officially support anything but sensorLowSpeed or sensorLowSpeed9v. This is also the only speed that is supported by HiTechnic. Anything other than that is unsupported and bugs will only be accepted as such if they are reproducible at the slower speed. Some sensors will work just fine at the higher speeds but there is no guarantee. In your code, using the slower sensor speed will not impact the execution of your code in any significant way.

Unfortunately, making the suggested changes in my code has not solved the problem. I have set the sensor type to LowSpeed, and have systematically investigated every possible combination of PF addresses in both program and using the orange switch on the IR receiver. No matter what, I don't even get a flicker on the green LED.

I have tried switching cables several times, switching sensor ports -- all no good. I had previously tested the IRLink using a leJOS driver with leJOS, and it did work. I suppose it is possible the IRLink has failed since then, but it has been sitting in a drawer, unused, so it does not seem very likely.

When I try to start RobotC, I now get the error message 'This application has failed to start because the application configuration is incorrect.'

I have now repeated the download/uninstall/reinstall sequence 3 times, but all with the same bad result.

Is it possible that the specified installer image is bad on ROBOTC.net?

Thanks!-Bill

Thu Oct 15, 2009 3:12 pm

wleue

Rookie

Joined: Tue Oct 06, 2009 4:42 pmPosts: 17

Re: Problems getting IRLink to work

Well, after about 10 retries, I finally got version 1.46 of RobotC to install. It turns out that it is not enough to uninstall the old version, you must also MANUALLY REMOVE THE ENTIRE ROBOTC DIRECTORY TREE. (This would be a great item to put into a FAQ, hint, hint )

So now version 1.46 appears to run. But it is not happy with the identifier 'sensorLowSpeed'. What should I use instead for this pragma?

The IR receiver is now seeing commands from the IRLink. There is one remaining issue, however: although in my test program I am commanding the motor to run first one direction (CDM_MOTOR_FWD), then the other (CDM_MOTOR_BAK) -- the motor itself is running only counterclockwise.

Might there have to be a further change to adapt to the RobotC 1.46 environment? What about using the CPM commands instead of CDM?

For what it's worth, my "lessons learned" during this effort are: 1. Stick with RobotC version 1.46 for now; be very wary of beta versions. 2. Always uninstall and delete the entire RobotC directory before installing a new version. 3. Don't use the direct mode IRL commands: stick with the Pwm ones. 4. Trust Xander

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum