Up テスト 作成: 2021-04-01
更新: 2021-04-01


    $ python >>> from di_sensors.easy_distance_sensor import EasyDistanceSensor >>> my_sensor = EasyDistanceSensor() >>> read_distance = my_sensor.read() >>> print("distance from object: {} cm".format(read_distance)) distance from object: 33 cm >>> read_distance = my_sensor.read() >>> print("distance from object: {} cm".format(read_distance)) distance from object: 300 cm >>> read_distance = my_sensor.read() >>> print("distance from object: {} cm".format(read_distance)) distance from object: 121 cm >>> quit()