Overhead lights demo


This tutorial demonstrates two different methods for operating the overhead lights and illustrates the commands needed for the seven LED light colours available - red, green, blue, yellow, cyan, magenta, white.

Top

Overhead lights via CN3B

This code is for when the overhead lights are plugged into the socket CN3B on the upper board of the top box.

SET(GPO6,1) #RED LED 
SET(GPO6,0) 
 
SET(GPO7,1) #GREEN LED 
SET(GPO7,0)
 
SET(GPO8,1) #BLUE LED 
SET(GPO8,0) 

SET(GPO#,1) turns on the specified LED when a 1 is placed after the comma. SET(GPO#,0) turns off the specified LED when a 0 (zero) is placed following the comma. Through turning the primary LED colours on and off in varying combinations, you can create the additive LED light colours.

  • GP06 controls the RED LED
  • GP07 controls the GREEN LED
  • GP08 controls the BLUE LED
Top

CN3B example script


ACTION OVERHEAD_LIGHTS_CN3B
 
#OFF 
 SET(GPO6,0) 
 SET(GPO7,0) 
 SET(GPO8,0) 
 WAIT(WAIT_TIME) 
 
#RED 
 SET(GPO6,1) 
 SET(GPO7,0) 
 SET(GPO8,0) 
 WAIT(WAIT_TIME) 
 
#GREEN 
 SET(GPO6,0) 
 SET(GPO7,1) 
 SET(GPO8,0) 
 WAIT(WAIT_TIME) 
 
#BLUE 
 SET(GPO6,0) 
 SET(GPO7,0) 
 SET(GPO8,1) 
 WAIT(WAIT_TIME) 
 
#YELLOW 
 SET(GPO6,1) 
 SET(GPO7,1) 
 SET(GPO8,0) 
 WAIT(WAIT_TIME) 
 
#MAGENTA 
 SET(GPO6,1) 
 SET(GPO7,0) 
 SET(GPO8,1) 
 WAIT(WAIT_TIME) 
 
#CYAN 
 SET(GPO6,0) 
 SET(GPO7,1) 
 SET(GPO8,1) 
 WAIT(WAIT_TIME) 
 
#WHITE 
 SET(GPO6,1) 
 SET(GPO7,1) 
 SET(GPO8,1) 
 WAIT(WAIT_TIME) 
 
COMPLETE
Top

Overhead lights via CN3A

This code is for when the overhead lights are plugged into the socket CN3A on the upper board of the top box.

SET(GPO3,1) #RED LED 
SET(GPO3,0) 
 
SET(GPO4,1) #GREEN LED 
SET(GPO4,0) 
 
SET(GPO5,1) #BLUE LED 
SET(GPO5,0) 

SET(GPO#,1) turns on the specified LED when a 1 is placed after the comma. SET(GPO#,0) turns off the specified LED when a 0 (zero) is placed following the comma. Through turning the primary LED colours on and off in varying combinations, you can create the additive LED light colours.

  • GP03 controls the RED LED
  • GP04 controls the GREEN LED
  • GP05 controls the BLUE LED
Top

CN3A example script


ACTION OVERHEAD_LIGHTS_CN3A
 
#OFF 
 SET(GPO3,0) 
 SET(GPO4,0) 
 SET(GPO5,0) 
 WAIT(WAIT_TIME) 
 
#RED 
 SET(GPO3,1) 
 SET(GPO4,0) 
 SET(GPO5,0) 
 WAIT(WAIT_TIME) 
 
#GREEN 
 SET(GPO3,0) 
 SET(GPO4,1) 
 SET(GPO5,0) 
 WAIT(WAIT_TIME) 
 
#BLUE 
 SET(GPO3,0) 
 SET(GPO4,0) 
 SET(GPO5,1) 
 WAIT(WAIT_TIME) 
 
#YELLOW 
 SET(GPO3,1) 
 SET(GPO4,1) 
 SET(GPO5,0) 
 WAIT(WAIT_TIME) 
 
#MAGENTA 
 SET(GPO3,1) 
 SET(GPO4,0) 
 SET(GPO5,1) 
 WAIT(WAIT_TIME) 
 
#CYAN 
 SET(GPO3,0) 
 SET(GPO4,1) 
 SET(GPO5,1) 
 WAIT(WAIT_TIME) 
 
#WHITE 
 SET(GPO3,1) 
 SET(GPO4,1) 
 SET(GPO5,1) 
 WAIT(WAIT_TIME) 
 
COMPLETE 
Top

Overhead lights via CN8

This code is for when the overhead lights are plugged into the socket CN8 on the lower board of the top box.

LIGHTS(LIGHT16,RED)
LIGHTS(LIGHT16,GREEN)
LIGHTS(LIGHT16,BLUE)
LIGHTS(LIGHT16,YELLOW)
LIGHTS(LIGHT16,MAGENTA)
LIGHTS(LIGHT16,CYAN)
LIGHTS(LIGHT16,WHITE)
 
LIGHTS(LIGHT16,ON)
LIGHTS(LIGHT16,OFF)

LIGHTS(LIGHT16,colour_name) turns on the overhead light as the colour named after the comma. Using LIGHTS(LIGHT16,ON) will turn on the overhead light as white.

Top

CN8 example script


ACTION OVERHEAD_LIGHTS_CN8
 
 LIGHTS(LIGHT16,RED)
 WAIT(WAIT_TIME)
 
 LIGHTS(LIGHT16,GREEN)
 WAIT(WAIT_TIME)
 
 LIGHTS(LIGHT16,BLUE)
 WAIT(WAIT_TIME)
 
 LIGHTS(LIGHT16,YELLOW) 
 WAIT(WAIT_TIME)
 
 LIGHTS(LIGHT16,CYAN) 
 WAIT(WAIT_TIME)
 
 LIGHTS(LIGHT16,MAGENTA)
 WAIT(WAIT_TIME)
 
 LIGHTS(ALL,OFF)
 
COMPLETE
Top

External light clip

This code is for when the external light clip is plugged in. The external light can be plugged into either CN7 or CN8 on the lower board of the top box. The external light is controlled via the LIGHT15 command.

LIGHTS(LIGHT15,RED)
LIGHTS(LIGHT15,GREEN) 
LIGHTS(LIGHT15,BLUE) 
LIGHTS(LIGHT15,YELLOW) 
LIGHTS(LIGHT15,MAGENTA) 
LIGHTS(LIGHT15,CYAN) 
LIGHTS(LIGHT15,WHITE) 
 
LIGHTS(LIGHT15,ON) 
LIGHTS(LIGHT15,OFF)

LIGHTS(LIGHT15,colour_name) turns on the external light as the colour named after the comma. Using LIGHTS(LIGHT15,ON) will turn on the overhead light as white.

NOTE: LIGHT15 and LIGHT16 can not be used simultaneously.

Top

External light example script


ACTION EXTERNAL_LIGHT
 
 LIGHTS(LIGHT15,RED)
 WAIT(WAIT_TIME)
 
 LIGHTS(LIGHT15,GREEN)
 WAIT(WAIT_TIME)
 
 LIGHTS(LIGHT15,BLUE)
 WAIT(WAIT_TIME)
 
 LIGHTS(LIGHT15,YELLOW)
 WAIT(WAIT_TIME) 
 
 LIGHTS(LIGHT15,CYAN) 
 WAIT(WAIT_TIME) 
 
 LIGHTS(LIGHT15,MAGENTA) 
 WAIT(WAIT_TIME) 
 
 LIGHTS(ALL,OFF) 
 
COMPLETE
Top

Script download

To download the overhead_lights script as a .zs file (file type Zantiks software reads), choose the Save File As option in the right-click dialogue box. Clicking on the script name hyperlink will open a read-only version of the script.

Script download:
overhead_lights.zs