|
Page 1 of 1
|
[ 7 posts ] |
|
Ultrasonic Sensors and Firmware
Author |
Message |
John L.
Rookie
Joined: Thu Feb 01, 2007 12:40 am Posts: 3 Location: Edmonton, Alberta
|
 Ultrasonic Sensors and Firmware
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.
|
Thu Feb 01, 2007 12:50 am |
|
 |
vnguyen
Site Admin
Joined: Wed Jan 24, 2007 10:44 am Posts: 442 Location: Pittsburgh, PA
|
 Re: Ultrasonic Sensors and Firmware
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 Nguyen Software Training Development Team | WebmasterNeed more support? Email ROBOTC Support at support@robotc.net to put in a support ticket Robotc.net| Robomatter Store | Robotics Academy | CS2N
|
Thu Feb 01, 2007 9:09 am |
|
 |
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 620
|
You should see something like the following when you start RobotC if you have not registered yet:
If you do not see this screen when you start RobotC, you do not have the most current version. If you downloaded from our website, but had a previous version installed, please do the following:
1. Uninstall "New" version (RobotC for Mindstorms)
2. Uninstall "Old" version (RobotC Beta 1.0.xx)
3. Re-install "New" version. (RobotC for Mindstorms)
This screen gives you a counter of how many days are left on your evaluation.
Let me know if this fixes the issue. Thanks.
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
Thu Feb 01, 2007 9:40 am |
|
 |
John L.
Rookie
Joined: Thu Feb 01, 2007 12:40 am Posts: 3 Location: Edmonton, Alberta
|
 Firmware, etc.
Thanks for the posts,
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 am Posts: 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].
Try it and post your findings. Thanks!
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
Thu Feb 01, 2007 11:19 pm |
|
 |
JamesD
Novice
Joined: Sun Feb 04, 2007 12:48 am Posts: 69 Location: Australia
|
 Issue of Sonar Sensor values "sticking"
Hi Tim,
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 am Posts: 3 Location: 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.
Great posts, thanks a lot,
John L.
|
Mon Feb 05, 2007 10:28 pm |
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|