CTI Software Libraries Code Samples

This page is continually revised with new examples, please check back frequently.


A note on the Excel spreadsheets: When opening any of the sample spreadsheets, Excel may display a warning that the spreadsheet contains macros. Excel is referring to the Visual Basic for Applications (VBA) code within the spreadsheet that communicates with the sensor. The sample spreadsheets do not contain any harmful macros, and may be opened safely.

Hello_World

The classic "Hello World" program - the simplest possible program that communicates with the sensor, acquires data and prints that data. C Source code.    C++ Source code.    Excel spreadsheet example

BaudRate

This program demonstrates querying the sensor's firmware version, as well as changing the baud rate of the serial communications link with the sensor. C Source code.    C++ Source code.   

Callback

Demonstrates using the library's callback functionality to efficiently acquire samples and write the data to a disk file. C Source code.    C++ Source code.

ExtSamples

Demonstrates changing the sensor's sampling rate, and acquiring extended sample information (ambient light, amplitude and temperature readings). C Source code.    C++ Source code.    Excel spreadsheet example

Filtering

Demonstrates using the library's filtering functions to discard samples outside of a specified range. C Source code.    C++ Source code.

Two Sensors

Demonstrates demonstrates acquiring and displaying range data from two sensors simultaneously. C Source code.    Excel spreadsheet example