|
tech-software-considerations
environment
visual basic version 6
running under microsoft windows xp operating system was chosen as the target development
environment as it gave straightforward access to speech, graphics, serial interfacing and
camera interfacing
windows is not a real-time
operating system - as it does not support pre-emptive multi-tasking or inter-task
synchronisation- but the real time performance is sufficient for the needs of this project
concurrency
the interface executable module
and all of the lower level modules that it calls run synchronously with the following
exceptions:
- the speech module calls into a
microsoft library function which uses a separate process to produce speech asynchronously
the advantage of this is that processing continues whilst speech is produced
the disadvantage is that callback functions have to be implemented in the calling module
to move the mouth of the simulation during speech
- the seetron dll which takes care of
low level communication with the servo motors when using the ssc servo controller uses a
separate process to send commands to the servo motors asynchronously
this reduces the delay in instructing the motors but it has the disadvantage that any
position instruction that it is buffering is overwritten if a new instruction is issued
before it is cleared from the queue
the result is that movement is likely to miss intermediate steps on a slow processor
a full description of how the seetron dll works can be found on the seetron web site (see
links)
- the sensor module is called from
the interface module on a separate timer
this means that camera sampling occurs on a timer so it runs concurrently with the control
system which is desired behaviour as it is important for the sensor module to continue
monitoring the cameras irrespective of what the control system is doing so that the
previous image, which is compared to the current image to find motion, does not become too
old
portability
the system runs on a pc with the
following minimum specification:
- 1ghz processor
- 256 mb memory
- 1 usb port
- 1 serial port
- sound card
the periodic aspects of the system
are independent of processor speed
integration
the format and scope of the
vectors sent from the sensor module to the interface module are as follows:
| N |
target is in the north sector |
| NE |
target
is in the north east sector |
| E |
target
is in the east sector |
| SE |
target
is in the south east sector |
| S |
target
is in the south section |
| SW |
target
is in the south west sector |
| W |
target
is in the west sector |
| NW |
target
is in the north west sector |
| C |
target
is in the centre section |
| F |
movement
level is above fright threshold |
| X |
movement
level is above intrigue threshold |
| L |
left pir
sensor triggered |
| R |
right
pir sensor triggered |
| P |
front
pir sensor triggered |
| H |
microphone
level is above noise threshold |
| Void |
movement
is below boredom threshold |
communication between the modules
uses microsoft component object module (com) which is the recommended method for
communicating between visual basic 6 components
|