Esempio n. 1
0
    if len(sys.argv) > 1:
        config_file_name = sys.argv[1]
        cameraID = int(sys.argv[2])

        if not os.path.exists(config_file_name):
            print("Config file does not exist.")
            exit()
    else:
        showHelp()
        exit()

    if camera_initFromFile(config_file_name):

        print("reseting")
        z = handle
        ArducamSDK.Py_ArduCam_setMode(handle, ArducamSDK.CONTINUOUS_MODE)
        ct = threading.Thread(target=captureImage_thread)
        rt = threading.Thread(target=readImage_thread)
        ct.start()
        rt.start()

        while running:
            input_kb = str(sys.stdin.readline()).strip("\n")

            if input_kb == 'q' or input_kb == 'Q':
                running = False
            if input_kb == 's' or input_kb == 'S':
                save_flag = True
            if input_kb == 'c' or input_kb == 'C':
                save_flag = False
Esempio n. 2
0
 def set_mode(cls, cam):
     r = ArducamSDK.Py_ArduCam_setMode(cam.handle, ArducamSDK.CONTINUOUS_MODE)
     if r != 0:
         raise AssertionError("Failed to set mode: {}".format(r))