Using the DT7837 Example Programs

The /usr/local/bin/dt78xx-examples/ directory on the DT7837 module contains a number of example programs that you can use to verify the operation of the module or perform specific operations, such as calibrating the analog circuitry of the module.

Each example program is located in a separate directory. Each example directory includes the executable (in the release directory), resource files used by the example (in the res directory), and a README.txt file, which provides information about the command-line arguments of the example program.

To run an example program, perform the following steps:

  1. Change to the directory that contains the example program that you want to run. For example, to run the dig-io example, enter the following command:

# cd /usr/local/bin/dt78xx-examples/digio

  1. To get help about the program, enter ./<path of the executable> ---help. For example, to get help on the digio example (with the executable name dig-io), enter the following command:

# ./release/dig-io --help

  1. Run the executable by entering ./<path of the executable>. For example to run the digital I/O example, enter the following command:

# ./release/dig-io

  1. To stop the program from running, press Ctrl-C.

When getting started, it is recommended that you use the web server application to verify the operation of the DT7837 module.

Note: All web-based example programs use the same default HTTP port (8080). Therefore, if you run one web-based example and then try to run another web-based example, the web page may not load correctly. To avoid this problem, either start the web-based example with a different port number (using the -p or -port option) or clear the browser cache history.