TK-Talkie Serial Interface Tutorial

You can configure and customize settings on your TK-Talkie by editing the configuration files on the SD card, a serial interface, or, for Version 3, using the mobile app connected via bluetooth.

This tutorial will concentrate on using the Serial Interface of your computer.

Getting Started

There are many serial interface terminals out there for Windows, Linux and Mac, so for this tutorial we'll use the Serial Monitor that comes with the Arduino IDE.

Once you have the Arduino IDE installed and running, connect your TK-Talkie to your computer using a USB to micro-USB cable.

Go to Tools -> Port in the main menu and you should see your TK-Talkie listed. For example, on Mac, may may look something like:

/dev/cu.usbmodem3604901 (Teensy)

IF YOU DO NOT SEE YOUR TK-TALKIE LISTED, you will need to install the serial drivers by installing the TeensyDuino loader for your operating system.

Connecting Via the Serial Monitor

Go to Tools -> Serial Monitor in the menu of the Arduino IDE and when the Serial Monitor opens, at the bottom there will be two drop-down menus. Set them to "No Line Ending" and the speed to 57600.

When you are connected, in the Serial Monitor window you should see:

----------------------------------------------
TKTalkie v3
(c) 2017 TK81113/Because...Interwebs!
www.TKTalkie.com
Debugging is OFF
Type debug=1 [ENTER] to enable debug messages
----------------------------------------------

While you are connected, you can type help to see a list of available commands.

Profile Configuration Settings

The following options are configuration settings for each profile (there are other settings that are global for the system and do not change between profiles.)

When making live changes via the serial interface, use the following format (NOTE that you do not use brackets, [ENTER] means press the ENTER key):


        setting_key=new_value [ENTER]
        

For example, if you wanted to lower the volume:


        volume=.4
        

Or maybe you want to make it beep:


        beep=number of times to beep (default 1)
        

Here are the currently available settings that you can change with the serial interface:

name
Sets the name of the current profile. This is displayed in the TK-Talkie App when loading profiles.


        # Profile name
        name=.55
        

volume
Manually set the overall output volume. Value values are any decimal values 0 to 1.


        # System volume
        volume=.55
        

NOTE: Volume levels past .7 will become distorted.

linein
Set the level for the line-in input. Valid values are 0 to 15, with 5 being the default. Lower numbers decrease the input level, higher numbers increase it.


        # Line-in signal level
        linein=5
        

NOTE: As of version 3, just the microphone input is used as line-out does not work with non-powered (cabled) microphones.

lineout
Set the level for the line-out signal. Valid values are 13 to 31, with 29 being the default. Lower numbers increase the level, higher numbers decrease it.


        # Line-out signal level
        lineout=29
        

startup
This is the sound that is played each time TKTalkie starts and must be located in the SOUNDS folder that is configured for the current profile.


        # sound to play when TKTalkie is started
        startup=STARTUP.WAV
        

loop
The background (chatter) file. This file starts AFTER the startup file, then will continuously loop while TKTalkie is running and must be in the LOOPS folder that is configured in the current profile.


        # chatter loop settings
        loop=TKLOOP.WAV
        

NOTE: The backgound loop will be silenced by default while you are speaking (but will continue running) unless you set the mute_loop setting to 0.

mute_loop
This setting determines whether or not the background loop mutes while you are talking. By default it is set to 1, which will cause it to mute. Set to 0 to turn off muting.


        # mute loop while talking (1 = yes, 0 = no)
        mute_loop=1
        

loop_gain
This is the sound level of the loop while it is playing. This should be set to a minimal level so that it is heard but not overpowering.


        # 0 to 32767, 1 is pass-thru, below 1 attenuates signal
        loop_gain=7
        

silence_time
The amount of time (in milliseconds…or thousandths of a second) to wait to make sure you are finished talking before playing an effect (static burst or mic click effect, etc.)


        # VOICE ACTIVATION SETTINGS
        silence_time=350
        

voice_start (formerly VOL_THRESHOLD_TRIGGER)
This is the input level received from the microphone that will trigger the Voice Activation when you begin talking.


        # valid values are any decimal value between 0.00 and 1.00
        voice_start=0.032
        

NOTE: You can use the Calibration Wizard via the serial interface to help set this level by typing calibrate.

voice_stop (formerly VOL_THRESHOLD_MIN)
The input level received from the microphone that indicates you are finished talking.

voice_stop=0.02
        

NOTE: You can use the Calibration Wizard via the serial interface to help set this level by typing calibrate.

The following entries are for using the PTT (Push-to-Talk) function

button_pin
This setting tells TKTalkie which pin on the Teensy your PTT button is connected to.


        # PTT (Push-To-Talk) SETTINGS
        button_pin=2
        

button_click
The sound to play when the PTT button is pushed (before you start talking.) When the button is released, a random sound will be played. This sound must be located in the configured EFFECTS folder for the current profile.

button_click=BUTTON.WAV
        

button_gain
The output level of the button sound.


        # 0 to 32767, 1 is pass-thru, below 1 attenuates signal
        button_gain=1
        

input
This setting specifies which voice input will be used, the microphone input or the line-in input. Default is microphone.


        # MICROPHONE/LINE-IN SETTINGS
        # input settings (0 = microphone, 1 = line-in)
        input=0
        

NOTE: This has been DEPRECATED from version 3 onwards as the input type is now set in the main SETTINGS.TXT file (See below).

mic_gain
The microphone input gain level.


        # 0 to 63
        mic_gain=15
        

NOTE: If you are experiencing feedback, try adjusting the mic_gain setting first.

effects_gain
This sets the output level of sound effects.


        # SOUND EFFECTS (STATIC BURSTS, ETC.)
        # 0 to 32767, 1 is pass-thru, below 1 attenuates signal
        effects_gain=5
        

eq
Specify the equalizer type to use.


        # EQUALIZER SETTINGS
        # 0 = flat (none, 1 = parametric, 2 = bass/treble, 3 = graphic
        eq=3
        

eq_bands
Depending upon they type of equalizer selected, specify the settings for each band. Bands are comma separated and valid decimal values from -1.00 to 1.00.


        # for parametric/graphic = 5 bands, for bass/treble = 3 bands
        # bands are low to high: -1 (-11.75dB) to 1 (+12dB)
        eq_bands=-1,0,1,0,-1
        

voice_gain
Set gain level for the voice input.


        # VOICE SETTINGS
        # 0 to 32767, 1 is pass-thru, below 1 attenuates signal
        voice_gain=1
        

bitcrushers
There are two bitcrushers to process the voice input and make it sound a little more tinny and robotic as if it is coming through a radio. These are comma separated values. Valid values for bits are 1 to 16, and valid values for rate are from 1 to 44100.


        # BITCRUSHER SETTINGS - VOCAL EFFECTS
        # Format = bits1,rate1,bits2,rate2
        # Set to 16,41000,16,41000 to just pass-thru (disable)
        bitcrushers=12,16384,10,10240
        

NOTE: You may need to disable these if using other voice processers such as a voice changer with TKTalkie.

noise_gain
While talking, pink noise is played behind your voice to help simulate radio communications. This setting sets the noise level. Set to 0 to disable.


        # PINK NOISE GENERATOR
        # 0 to 32767, 1 is pass-thru, below 1 attenuates signal
        noise_gain=1
        

Global Configuration Settings

The following settings are global for the system and are not profile specific.

NOTE: All of these settings take effect immediately when entered.

input
Specify the input device your TK-Talkie is using. Default is microphone


        # Specify input device (mic = microphone, line = line-in)
        input=mic
        

debug
Turns the debug setting on or off. Default is off. When on, messages during program operation will be displayed to the serial interface. This can be useful when testing configuration settings.


        # Turn debug on or off.  Valid values are 1 (on) or 0 (off.)
        debug=0
        

echo
Turns the echo setting on or off. Default is off. When on, messages sent and received from the BLE (Bluetooth) adapater will be displayed to the serial interface. This can be useful when testing configuration settings.


        # Turn BLE echo on or off.  Valid values are 1 (on) or 0 (off.)
        echo=0
        

access_code
Sets the BLE password for your system. This password must be entered when accessing your TK-Talkie via bluetooth (This is automatically handled by the TK-Talkie App once you have added your TK-Talkie to the device manager in the app.)


        # Set the system password
        access_code=1234
        

default
Set the default profile to be loaded when TK-Talkie powers up. This profile must be location in the PROFILES folder.


        # Set the default profile
        default=DEFAULT.TXT
        

Other Commands

The following commands are also available (type help at any time to see them):


        help                  Show this help screen.
        files                 Show a list of files on SD card.
        profiles              Show a list of available profiles on SD card.
        effects               Show directory listing of the currently configured effects folder.
        sounds                Show directory listing of the currently configured sounds folder.
        loops                 Show directory listing of the currently configed loops folder.
        beep=n                Play warning beep sound n times
        mute                  Mute all sounds
        unmute                Unmute all sounds
        reset                 Resets the TKTalkie unit

        settings              Show current settings.
        config                Displays the system settings
        load                  Load settings from default file specifed in system config
        save                  Save settings to currently loaded profile
        load=filename         Load settings from specified file
        save=filename         Save current settings to specified file
        default=filename      Set the default settings profile to be loaded
                              when TKTalkie starts
        delete=filename       Delete a settings file

        play=filename         Plays the specified .WAV file (use full path/filename)
        play_effect=filename  Play specified file from the currently configured effects folder
        play_sound=filename   Play specified file from the currently configured sounds folder
        play_loop=filename    Play specified file from the currently configured loops folder
        stop_loop             Stop currently playing loop

        backup                Quick backup of current settings file to SETTINGS.BAK
        restore               Quick restore from SETTINGS.BAK
        

NOTE: Changes take effect immediately. However, you must use one of the save commands or they will be LOST when the device restarts.