To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 429
428  |  430
Subject: 
Re: RCX Programming Questions and Sensor Ideas
Newsgroups: 
lugnet.robotics
Date: 
Tue, 10 Nov 1998 22:00:35 GMT
Original-From: 
Peter Hesketh <pbh@phesk.demon.co.!StopSpam!uk>
Viewed: 
2691 times
  
In article <255199E650C3D11194BF00805FA785365101AB@cs03mail.BestBuy.com>
, Cwikla, Brian <Brian.Cwikla@BestBuy.com> writes
On page 4 of the Technical Reference in the Minstorms SDK there is a
reference to a semaphore mechanism.  It says:  It is possible to implement a
semaphore mechanism (using one global variable and exploiting the
instruction set) to provide exclusive access to shared resources.  Could
someone explain this?  What it does, how to implement it and
advantages/disadvantages.(Especially helpful if from a VB position)  I've
only come across the following and don't understand it totally: A semaphore
is a software mechanism that is used to control and coordinate multiple
program executions either on the same computer or on different computers on
a network.

An example.  Say you want to prevent two tasks from fighting over motor
1.  Just insert an instruction in each task before operating the motor
to check that var 31 contains zero.  If it does, set var 31 to 1 and
control the motor, then set var 31 to 0 again.  If a task sees var 31 is
non-zero then you can program it to wait or abort as you wish.

To share 3 motors you could use values of 1, 2 and 4 to indicate motors
1, 2 and 3.

A voice recognition module.  The module has, say, 8 memory banks where there
can be 3 or 4 seconds of 8-bit audio.  Then, the on board voice recognition
processors analyze the sound, match it to the proper bank and then send a
number value to the RCX input port that it is attached to.  I know this
sounds really far fetched and probably really expensive, but I thought it
would be cool to verbally tell my RCX to turn right etc...

Voice recognition is much more difficult than comparing digitised sound
with an 8-bit audio file.  Just try recording and comparing the binary
of 2 wav files of the word "Left"

Why not a sensor that relates to a remote beacon.  The remote beacon is a
battery operated, stand alone unit that emits a IR pulse/signal every x
amount of time.  The sensor connects to the RCX has four detectors on it all
facing in opposite directions.  The sensor receives the pulse and the two
detectors that receive the strongest signal (from the direction the beacon
is) derive some number that is sent to the RCX.  Multiple beacons would have
different 'carrier' signals so that the program can determine from what
beacon the signal came.  I think the reason I thought this one up is for a
very specific device I was building and am not sure how useful this would be
in a general sense.  However, I can't imagine this being a
complicated/expensive device to build.

IR has problems with obstacles in a room.  A much better method is
ultrasonic beacons as they transmit round corners and under chairs.  You
would not use 4 directional sensors, but measure the time delay for a
distance measurement.




--
Regards - Peter Hesketh, Mynyddbach, Mon.
Forty reasons why a dog is better than a woman: number 6
"Dogs don't expect you to call when you are running late."



Message has 3 Replies:
  Re: RCX Programming Questions and Sensor Ideas
 
(...) This assumes that the check and the set are, together, atomic. Does the SDK document describe what if/why this might be atomic? I haven't had a chance to read it in enough detail to find this answer for myself. -Kekoa (26 years ago, 10-Nov-98, to lugnet.robotics)
  Re: RCX Programming Questions and Sensor Ideas
 
I hope someone reads this reply to a reply to a very OLD message. I've been lurking for almost a month and, during a search, I found a thread I can expand. (...) [snip] (...) It is more difficult than this to recognize speech, but it can be done. (...) (25 years ago, 27-Aug-99, to lugnet.robotics)
  Re: RCX Programming Questions and Sensor Ideas
 
I think it would be more interesting to synthesise human voice, that is to make the RCX speak! :-] (...) [ mailto:lau@mail.telepac.pt ] [ (URL) ] -- Did you check the web site first?: (URL) (25 years ago, 28-Aug-99, to lugnet.robotics)

Message is in Reply To:
  RCX Programming Questions and Sensor Ideas
 
Well, I figure I've been lurking long enough and time to share some questions and thoughts. Question 1: On page 4 of the Technical Reference in the Minstorms SDK there is a reference to a semaphore mechanism. It says: It is possible to implement a (...) (26 years ago, 10-Nov-98, to lugnet.robotics)

17 Messages in This Thread:






Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR