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

Is it possible to use this library with arduino? #956

Open
uguraltinsoy opened this issue Jan 29, 2024 · 4 comments
Open

Is it possible to use this library with arduino? #956

uguraltinsoy opened this issue Jan 29, 2024 · 4 comments

Comments

@uguraltinsoy
Copy link

I want to control my camera with Arduino, I want to connect via usb and I want to do things like video start stop etc. through Arduino and I want to read data such as iso, shutter speed, video recording on cameras that support it, is this possible?

My camera Sony A7RII

@msmeissn
Copy link
Contributor

I am not familiar with Arduino level support. Also google search did not bring up references so far.

@uguraltinsoy
Copy link
Author

I just want to get the information of the camera. Does it record video or not? It started recording and it didn't start, it's enough if I can read this data

@ndim
Copy link
Member

ndim commented Jan 30, 2024

The answer will certainly depend on what kind of Arduino are you thinking of.

There are a number of very different boards on offer from Arduino, starting from a 512B SRAM + 16KB Flash Arduino Nano. libgphoto2 (plus libusb) will certainly not fit into that small amount of memory at all.

Going by https://en.wikipedia.org/wiki/List_of_Arduino_boards_and_compatible_systems#Official, the biggest MCUs in the Arduino portfolio are an ESP32 with 16MB Flash/512KB SRAM running whatever and an Atheros AR9331 with 16MB Flash, 64 MB DDR2 DRAM running Linux.

Using libgphoto2 without an underlying operating system (as is typical for Arduinos) would also require you to write an operating system compatibility layer.

The 16MB Flash of the Arduino Yún rev2 might be possible with some effort. Whether it is worth the effort to try to cram linux + libgphoto2 + libusb into that small a space... no idea. How/whether the Yún rev2 allows you to program the Linux processor, and how/whether the Linux processor is connected to a (host?) USB port, I could not find out quickly.

So I am also not certain if is possible to run libgphoto2 on any Arduino product in general, and for you personally (I do not know you and your level of technical expertise).

If I were to look for a small computer to run libgphoto2 on, I would be looking at something running BSD or Linux, with at least several dozen MB of RAM. More Raspberry Pi territory than Arduino territory. As always though, more (computing) power requires more (electrical) power.

Going smaller and more bare metal (without an operating system) might be possible with libgphoto2, but will certainly require a lot of low level USB and C and build system knowledge. For such hardware, it might be easier to build on some existing USB layer and implement a PTP layer on top of, maybe using libgphoto2 code more or less as documentation. That will certainly be a lot of work, even if you really know your way around embedded stuff. Using the Arduino software stack for such a thing might or might not be possible.

@uguraltinsoy
Copy link
Author

Unfortunately I don't know much about embedded systems but thank you for your explanatory article I will think of another way

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

3 participants