# Serial interface   Pro

The Serial interface allows you to start and stop tracks saved on the satellite as well as dynamically adjust their intensity from a computer program or a Serial console.

# Upload a project

Start by uploading any project to the Satellite:

Upload project
../projectupload/

# Establish a serial connection

Only a single serial communication can be established to the Satellite at once. Before connecting to an external API, make sure to disconnect the Satellite within the connection menu inside Hapticlabs Studio.

In your external application, make sure to set the baud rate to 115200.

# Command syntax

# Start a track

startTrack("trackName" amplitudeScale);

Replace the trackName with the name of the track you want to playback. Optionally, you can pass a value to scale the intensity (amplitude) of the track to be played back, for example doubling the intensity.

Start a track
//Play the track called 'Short Pulses':
startTrack("Short Pulses");


//Play the track 'Short Pulses' at twice the intensity:
startTrack("Short Pulses" 2);

# Stop playback

stop();

With this command, you can terminate any currently active playback.


# Scaling intensity   Pro

setAmplitudeScale(amplitudeScale);

This command allows you to vary the intensity (amplitude) of the satellite output during the playback. The default value is 1.0, so you can reduce the intensity from its standard value by passing a scale value smaller than.

Scaling Intensity
// Decrease the intensity value
setAmplitudeScale(0.7);

// Incerasing the intensity value
setAmplitudeScale(1.3);

// Reset the intensity value
setAmplitudeScale(1.0);