Summary - Infrared Proximity sensing from one specified direction
32 <BYTE2> <BYTE3> <BYTE4> (decimal format)
BYTE1: 32 (the command)
BYTE2: INDEX 0-7 for direction (i.e. 0=N, 1=NE, 2=E, etc)
BYTE3: 01 = Decimal Output
BYTE3: 02 = Ascii Output
BYTE3: 03 = Ascii Output - Delimited
BYTE4: 0= single shot operation
55 = continuous operation-
Response from IRCF360:
Average proximity readings from each direction:
Decimal format: <INDEX> <Reading>
Ascii Format: Hits <INDEX> = <Reading> 013 (Carrage return)
Ascii Delimited: <INDEX> ; <Reading> 013 (Carrage return)
Circular Display Feedback:
If an object is detect in any direction the corresponding LED will illuminate (see videos)
Similar to command 30, but proximity sensing is from one specified direction.
Values from 0 to 50 are returned depending on the proximity of objects detected. Close objects have higher values.
This command is used for detecting obstacle in the direction the robot is travelling. For example when travelling forward direction, only the N, NE, NW directions need to be probed for objects. This reduces the volume of data that need to be processed and reduces the IR noise which becomes specifically important with many robots.
The command can be used for:
- Used in swarms and flocks. Specifically within flocks where a constant distance to a neighbouring flock member needs to be maintained to ensure collective patterns
- proximity sensing when travelling in a direction and at the same time monitoring objects that may be moving towards it.
- executed when in a stationary position to make assessment of the stationary objects or object that are moving.
- Determine and avoid possible attacks when in robot gaming mode
The PICAXE 18X does not have a 'time-out' function, so it will 'hang' if the timing of the serial communication is not correct. With the new X2 parts these have a time-out routine so the command can be retransmitted.
Example Programming Code for PICAXE
Example Programming code for Basic Stamp
Non (under construction)