Subject:
|
Re: IR Transmission Range when bounced off of Ceiling...
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Fri, 8 Jan 1999 18:16:05 GMT
|
Original-From:
|
Laurentino Martins <LMARTINS@nospamMARKTEST.PT>
|
Viewed:
|
1530 times
|
| |
| |
> I want to have the RCX "Check Back" w/ the Base Station computer for
> commands (ala Cybermaster) as I can't yet get a real neural network
> going on the RCX.
The CyberMaster can't check the tower, only the tower (PC) can check and give orders to the CyberMaster.
Here's a mail I've sent to Peter Ljungstrand a few days ago that explained in detail what I've done with the CyberMaster.
It's a bit lengthy and I hope nobody falls asleep while reading it, but I think it's of general interest and this list only gains with this post.
----
The CyberMaster's memory is 404 bytes, and it's nothing compared to my projects needs, but I decided to embrace the challenge anyway!
Now I had the challenge to make both the unit and the PC programs run with each other, but also to optimize the way of doing things (read: size) as much as possible.
I thought a lot about the subject (I'm still thinking) in my way to work/home and almost every night I came home with a better way of doing the same I've already implemented the night before.
I'd say it was pretty educational, since these days of almost unlimited memory we have the tendency to become sloppy in the programming, even without noticing it.
I figured I should make the things work the most intelligent way I could, and that brought me a lot of other problems.
The Unit:
The unit knows how to follow orders and knows how to report problems.
If knows how to drive, and to drive looking to impacts in the sensors or unexpected tacho speeds.
Anything unusual that it senses while driving, instantaneously stops the motors, reports the PC what happened, and waits for new orders.
The normal drive is supported for driving away from walls after an impact, since the other "intelligent" drive stops the motors on any impact and it would never be able to run away from a wall as long as a sensor was pressed.
The monitoring of the tacho speeds is done by watching if the speed values goes bellow the expected values for the current speed, and reports a tacho error.
(I've found out that the battery charge is also important for calculating the expected speed. A formula that uses both values would be the ideal.)
This is useful for those impacts that sometimes are not caught by the sensors and for objects the treads can drive thru but I don't want them to!
The PC:
The VC++ program was the major headache since the timer I used to monitor the unit stopped when I entered some kind processor intensive task.
This happens because timers are *low* priority and stop working the moment there isn't any free processor time.
I fixed the problem by using a Multimedia timer which is much more precise and works great since then.
Besides a basic driving mechanism, that is, giving orders to the CyberMaster and reading the status of it, the purpose of the program was to draw the path the unit it's following in the screen.
The only two numbers I can work with are the tacho counters, and it took a lot of work to figure a good way to make reliable drawings in the screen, although they are no more than geometry formulas and fit in a couple of lines.
It's not perfect yet (if it ever will), because the formulas use a lot of geometry, something I'm not specially very good at.
I must figure a way of making those calculations because that's the main reason of the difference in the distance travelled on the ground and the seen in the screen.
The program as it stands now has a lot of potential for improving, and the greatest thing is that they are both so flexible that with a couple of changes I can use them to put almost any project to work! :-)
----
And sorry the English, I'm doing my best.
ZZZzzzz....
Laurentino Martins *<||:-)
[mailto:lau@mail.telepac.pt]
[http://www.terravista.pt/Enseada/2808/]
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics
|
|
Message is in Reply To:
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|