040 - Circular Display - Turn on Led

Summary - Illuminate an LED on the circular display for a specified period

Syntax:

40 <BYTE2> <BYTE3> <BYTE4> (decimal format)

Where:

BYTE1: 32 (the command)

BYTE2: INDEX 0-7 for direction (i.e. 0=N, 1=NE, 2=E, etc)

BYTE3: Duration (MS) default 100

BYTE4: 0= single shot operation

BYTE4: 255 = continuous operation-

Response from IRCF360:

No serial communication feedback unless command 10 (echo on) has been actuated.

Circular Display Feedback:

Corresponding LED illuminates

Description:

Will illuminate one LED on the circular display for a specified time or continuously.

The command is used to enable the robot controller to give visual feedback for example:

    • Debugging

    • Indication of state

    • Visual Effect

    • Display of a particular mood or an expression of emotion within a game or swarm / flock (e.g. sleeping, eating, angry, dead)

See also command 072 for similar function with single fade of LED

Technical Features

None

Example Code:

Example Programming Code for PICAXE

MAIN:

For aloop = 1 to 5

SEROUT b.2,T9600_8, (40,0,0,0) 'Turn on North LED for default period

SEROUT b.2,T9600_8, (11,0,0,0) 'Turn off circular display

PAUSE 500

SEROUT b.2,T9600_8, (40,4,0,0) 'Turn on South LED for default period

SEROUT b.2,T9600_8, (11,0,0,0)

PAUSE 500

Next

For aloop = 1 to 5

SEROUT b.2,T9600_8, (40,2,0,0) 'Turn on East LED for default period

SEROUT b.2,T9600_8, (11,0,0,0)

PAUSE 500

SEROUT b.2,T9600_8, (40,6,0,0) 'Turn on West LED for default period

SEROUT b.2,T9600_8, (11,0,0,0)

PAUSE 500

Next

GOTO MAIN

Videos: