Vernier Software and Technology
Vernier Software & Technology

Setting Defaults and Passing Arguments

This example shows you how to avoid using prompts (and instead pass arguments) to select the active sensors and set the measurement period.

This examples is the same as, except we are now 
passing arguments in the select_sensors() and start() functions to avoid the prompts.

This example assumes the Go Direct sensor is connected via USB. Go to the example to see how to open a bluetooth connection.

Note that the select_sensors argument is a list and the sensor numbers must be inside 
list brackets, e.g. gdx.select_sensors([1,2,3]).

How do you know what the sensor numbers are on your Go Direct device? Go to example to list all of the sensor channels.


from gdx import gdx #the gdx function calls are from a file inside the gdx folder.
gdx = gdx.gdx()


for i in range(0,5):
    measurements = #returns a list of measurements from the sensors selected.
    if measurements == None: 

Go to top