I am using the demo and assume that it will expire in 30 days. I see no indication of how much time is left on the demo. Before I buy it, I am watching for a Mac version. I'm not sure of the time frame for releasing a Mac version.

Besides having a lot of fun, I noticed a couple of things:

I am using 2 ultrasonic sensors to track along the walls of a room. When I try to use a second sensor in Port 2 (S2), I don't get proper data from it. It isn't the sensor. Am I missing something?

Also, when I went back to using the Lego software, it warned me that I had changed the firmware and offered to "update it". Is this a problem?

Thanks, John L.

Thu Feb 01, 2007 12:50 am

vnguyen

Site Admin

Joined: Wed Jan 24, 2007 10:44 amPosts: 441Location: Pittsburgh, PA

Re: Ultrasonic Sensors and Firmware

John L. wrote:

So many questions, but I need to say that RobotC is a great package!

I am using the demo and assume that it will expire in 30 days. I see no indication of how much time is left on the demo. Before I buy it, I am watching for a Mac version. I'm not sure of the time frame for releasing a Mac version.

Besides having a lot of fun, I noticed a couple of things:

I am using 2 ultrasonic sensors to track along the walls of a room. When I try to use a second sensor in Port 2 (S2), I don't get proper data from it. It isn't the sensor. Am I missing something?

Also, when I went back to using the Lego software, it warned me that I had changed the firmware and offered to "update it". Is this a problem?

Thanks, John L.

Hi John!

Thanks for the comments. Yes, your evaluation period will end in 30 days.

As far as your ultrasonic sensors, do you have the code that you were using? I'd like to try the same code on my robot and then I can see if there is anything wrong.

When you go back to the LEGO Mindstorms software, it will ask you to load the LEGO Mindstorms firmware. This is appropriate because when you use ROBOTC, you must use ROBOTC's firmware. Firmware is very easily interchangeable.

Please let me know if you have any other issues. Thanks John!

_________________Vu NguyenSoftware Training Development Team | WebmasterNeed more support? Email ROBOTC Support at support@robotc.net to put in a support ticket

I will try replacing the beta of RobotC with the final version and check the second ultrasonic sensor.

The code I used essentially took a line from one of the Ultrasonic Sample Programs, a const declaration that seems to associate a variable with S1. I added a similar statement with a different name and used S2 instead. The distance values from it are not meaningful. I will check this with the proper firmware.

If a problem remains, I will sure post the code that doesn't work.

Thanks again for the help.
John L.

Thu Feb 01, 2007 9:46 pm

tfriez

Site Admin

Joined: Wed Jan 24, 2007 10:42 amPosts: 620

There could be *something* about the Sonar Sensor if you feel your values are "sticking".

When the sonar sensors reports back a value, it reports back in centimeters. If the sonar sensor sends out a pulse but can't find an echo, it usually reports back a 255 (to denote no signal).

RobotC has a condition functionality built into using the Sonar sensor where it will ignore the 255 and continue to send you the last correct value. This works pretty well but can be a little misleading.

If you would like to try the sensor in the raw, unconditioned state, use the SensorRaw[sensor_name] instead of SensorValue[sensor_name].

This is a problem that seems to catch out a lot of users (including me) until I saw a reference explaining it was an intentional design choice in the old bug fixes section. Although there is a work around for it ie using SensorRaw(sensor_name) instead, if it continues to catch people out it may be worth looking at ways to make this feature choice more obvious.

As a suggestion would it be better to make 'stickiness' on optional function within SensorValue or would this be too complicated given SensorValue deals with all the different sensors?

Thanks
James

Sun Feb 04, 2007 1:12 am

John L.

Rookie

Joined: Thu Feb 01, 2007 12:40 amPosts: 3Location: Edmonton, Alberta

Using 2 Sonar Sensors

I have downloaded the proper version of RobotC with the up to date firmware. Two sensors work fine.

What I thought I was experiencing was not so much a sticking value as a completely nonsensical value. But again, that was a late beta version.

The stickiness idea is interesting. I will watch for this as there will be times when I will have a vehicle go past an outside corner.

Who is online

Users browsing this forum: No registered users and 2 guests

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