We provide the basic usage and skill in the sample programs with source code.
Because the sample programs are made as simply as possible, you need to make good use of these for programming.
The following figure shows the structure of the folder in which COM-DRV(LNX) is installed.
User Directory/contec/comdrv
|
|________samples
|
|_______gcc gcc version samples
|
|_______python python version samples
In the folder of each development language, sample programs are stored with the following configuration.
Development Language |
Source File Name |
Sample Name |
gcc Samples |
comread.c |
|
comsend.c |
||
comtest.c |
||
Python Samples |
comwriteread.py |
You can compile all the sample programs by executing the following command.
# cd contec/comdrv/samples/gcc
# make
Python is an interpreted programming language.
Therefore, there is no need to compile the source code beforehand.