Skip to content
amicallef edited this page Mar 29, 2017 · 2 revisions

A set of trials are run through the SerialController.py script. At the windows command prompt cd to the root directory of the behaviour_box repository.

When the program runs the first thing it does is make a new folder to save the logs in. The base of the new directory can be specified by --datapath and the new folder is always the current date is in the format YYMMDD.

In addition it also creates two files, a raw log file which stores all time stamped communications sent and received by the program, and a csv file which contains the same data in tabulated form. The name pattern for the csv is ID_date_000.csv where ID is given with the -ID argument and date is in the format YYMMDD. It is important to note that the data files will be appended to each time the program is run over the course of the day, unless a new ID is specified.

Next the program checks the serial port specified by the --port argument. On Windows the serial ports are specified by COMx where x is some integer. In my case my Arduino always occupies COM5, so I have set that as the default port to check. More about adjusting defaults in a bit. If no communications are found the program will exit.

Clone this wiki locally