• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

Progamming the CFA-631/633/635 Buttons

jc634

Administrator
Progamming the CFA-631/633/635 Buttons



Author: JC634

Programming Instructions:

Programming the buttons on the CFA-631, CFA-633 and CFA-635 require editing the cc2_service.ini file. Buttons can be programmed to control overall module events such as scrolling through the screens. You can program the buttons of one module to control events of another module.

You can also program the buttons to control screen-specific events. For example, you can program Winamp screens to change tracks, control the volume, etc.

When programming the buttons, the designator to tell which button you are monitoring is as follows:

CFA-633 and CFA-635 buttons:
Code:
UP               =      1
DOWN             =      32
LEFT             =      8
RIGHT            =      16
X                =      4
TICK             =      2
CFA-631 buttons:
Code:
UPPER LEFT       =      1
UPPER RIGHT      =      2
LOWER LEFT       =      4
LOWER RIGHT      =      8
In addition, you will need to open your appropriate module .ini (for example, lcd_635.ini) to determine what the button id is.

When you open this file, the beginning lines will look similar to this:
Code:
[module00]
id=3088604686
id_keypad=96615893
key_repeat_rate=250
Record the id_keypad number. You will need this number to program your keypad.

At this point, you will need to stop the CC2 Service. I’ve found it easiest to use <Ctrl><Alt><Delete> to bring up the Windows Task Manager. Click on the Processes Tab. Scroll through the list and find the Image Name cc2_service .exe. End this process.

Open the cc2_service.ini file. In this example, I assume that you have 1 LCD. The beginning of this file will look similar to this:
Code:
[general]
windows_start=1

[m00]
id=3088604686
module_name="Crystalfontz 635"
options=0
screen_sel=23
alt_enabled=1
brightness=70
contrast=40
dkc_disable=0

[m00-s00]
screen_name="jc_CPU Usage-ani"
options=0
alt_delay=5000
You will need to change the line dkc_disable=0 to dkc_disable=1.

To add button commands to allow the Up/Down buttons to scroll through your screens, add the following lines between the dkc_disable=0 line and the [m00-s00] line:
Code:
[m00-event00]     ; 1st module, 1st event
if_type=1
if=96615893     ; Substitute your id_keypad number here.
cond=0
to=1.000000     ; This tells CC2 that you want to poll the UP key.
do_type=9       ; This tells CC2 that this is a screen change command.
do=1.000000     ; This tells CC2 to scroll up one screen.

[m00-event01]   ; 2nd module, 2nd event
if_type=1
if=96615893     ; Substitute your id_keypad number here.
cond=0
to=32.000000    ; This tells CC2 that you want to poll the DOWN key.
do_type=9       ; This tells CC2 that this is a screen change command.
do=-1.000000    ; This tells CC2 to scroll up one screen.
You can use the keypad of one module to control a different module. For example, I use the LEFT/RIGHT arrow buttons on my CFA-635 to scroll through my CFA-634 screens.

Once you edit the cc2_service.ini file, save it and restart CC2. You can now use the keypad to scroll through your screens.

To add keypad commands to a specific screen, you will again have to modify the cc2_service.ini file. On my CFA-634, I have CC2 automatically go to a Winamp screen when I play a song in Winamp.

To do this, add the following lines to the cc2_service.ini file. This example assumes that you have 1 module (CFA-635) installed:
Code:
[m00-event00]
if_type=1
if=1001136639           ; winamp play status id number
cond=1                  ; polling to see if winamp is playing
to=0.000000
do_type=1
do=0.000000             ; if playing, go to the winamp screen (1st screen is this example)

[m00-event01]
if_type=1
if=1001136639           ; winamp play status id number
cond=3                  ; polling to see if winamp is paused
to=0.000000
do_type=1
do=0.000000             ; if paused, go to the winamp screen (1st screen is this example)

[m00-event02]           ; keypad scrolling command
if_type=1
if=96615893
cond=0
to=1.000000
do_type=9
do=1.000000

[m00-event03]           ; keypad scrolling command
if_type=1
if=96615893
cond=0
to=32.000000
do_type=9
do=-1.000000
To add keypad commands to the winamp screen, refer to this example:
Code:
[m00-s00]                         ; 1st module, 1st screen
screen_name="WA Name 2CH Spect-Anyl"
options=0
alt_delay=50000

[m00-s00-event00]                       ; 1st module, 1st screen, 1st event
if_type=1
if=96615893                             ; Substitute your id_keypad number here.
cond=0
to=2.000000                             ; This tells CC2 that you want to poll the TICK key.
do_type=3197071286                      ; Winamp command to turn Volume Up 1%
do=1.000000

[m00-s00-event01]
if_type=1
if=96615893                             ; Substitute your id_keypad number here.
cond=0
to=4.000000                             ; This tells CC2 that you want to poll the X key.
do_type=468189197                       ; Winamp command to turn Volume Down 1%
do=1.000000

[m00-s00-event02]
if_type=1
if=96615893                             ; Substitute your id_keypad number here.
cond=0
to=16.000000                            ; This tells CC2 that you want to poll the RIGHT key.
do_type=1216962439                      ; This tells CC2 to go to the Next Track

do=1.000000

[m00-s00-event03]
if_type=1
if=96615893                             ; Substitute your id_keypad number here.
cond=0
to=8.000000                             ; This tells CC2 that you want to poll the LEFT key.
do_type=133939910                       ; This tells CC2 to go to the Previous Track
do=1.000000

[m00-s00-event04]
if_type=1
if=1001136639                           ; winamp play status id number
cond=0                                  ; polling to see if winamp is stopped
to=0.000000
do_type=9
do=1.000000                             ; Skip this screen and go to the next screen

[m00-s00-r00]                           ; Beginning of Screen information
options=10
scroll_speed=250
Do you want to do something else? And you are unsure of how to do it? Ask in the User Screen Discussion forum.

Development thread: Part of the User Screen Syntax Manual.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
Top