Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manualFocusPreview - How to Save Settings #60

Open
cherbin opened this issue Nov 20, 2021 · 1 comment
Open

manualFocusPreview - How to Save Settings #60

cherbin opened this issue Nov 20, 2021 · 1 comment

Comments

@cherbin
Copy link

cherbin commented Nov 20, 2021

Hello,

The manualFocusPreview.c works with the focus.

Once you exit the program , the camera does not keep/save the current focus value..

How do you save the focus value so that when you run the raspistill from command line so it has the previous focus position ?

vcm_write seems to be only temporary when until the camera turns off.

@Exscotticus
Copy link

Exscotticus commented Nov 25, 2021

Same question. I'm running a headless Pi and don't even have a GUI preview option. I tried both extremes and compared images taken with raspistill. No difference in focus.

Here's my methodology...

pi@raspberrypi:~ $ cd RaspberryPi/Motorized_Focus_Camera/python
pi@raspberrypi:~/RaspberryPi/Motorized_Focus_Camera/python $ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import *
>>> arducam_vcm = CDLL('./lib/libarducam_vcm.so')
>>> arducam_vcm.vcm_init()
0
>>> arducam_vcm.vcm_write(0)
255

Now I take a pic and download it.

>>> arducam_vcm.vcm_write(1023)
255

Now I take another pic, download it, and compare the two.

Note the return values of 255. I believe that indicates failure to execute. 0 indicates success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants