Is the raspberry pi still a better option in this scenario? I have more programming knowledge with Arduinos, so that would be my preferred option, but if a Raspberry Pi will make everything simpler, I can make that work!
Ultimately, I am trying to make a tracking device that follows a teacher in a classroom
Using a Pi will be a lot simplier to program and the Pi has a lot more computing power. It also will function as a USB master. The only real drawback is power consumption.
FWIW, on some cameras it's not too hard to get information out of the native firmware face tracking: https://chdk.setepontos.com/index.php?topic=8243.msg86889#msg86889
Another question. I have been looking around on the wiki website and am seeing a lot of useful commands to be able to use via Lua to do things with CHDK, but is there a good place to look at how to start programming in Lua specifically for CHDK for a beginner? I'm struggling on how exactly to start with the script I want. Especially if using a Pi is the best way to go.
In chdkptp, you can use the = command to call any of these functions. So for example, to zoom in one step, you could send=click'zoom_in'Some functions like switching to record mode and shooting also have dedicated commands in the chkdptp CLI. You can use the help command to get a list.https://app.assembla.com/spaces/chdkptp/wiki/CLI_Quickstart has information about using the chdkptp CLI.https://app.assembla.com/spaces/chdkptp/wiki/Scripting_Guide has information about scripting from chdkptpFrom your description, it seems like you will have some process which takes commands from the remote, and responds by sending commands to the camera. This could be done by executing chdkptp with the -e option to execute code each time, or you could start chdkptp once and pipe commands to it's standard input.
The only issue I am facing (and and still searching the wiki and in internet while waiting for a response) is how exactly to get my camera to turn on while connected to the Pi via USB. I have it connected, but my camera is just sitting here and not wanting to turn on while connected. I do have the remote functionality deselected on the camera.
From your screenshot, I guess you mean the camera is on and connected, but the screen is black and you cannot switch to record (shooting) mode?If so, this is probably due to gphoto accessing the camera when you connect it, via some udev rules. See "interactions with default software" in https://app.assembla.com/spaces/chdkptp/wiki/Install
Yes, that's exactly what I mean. I plug in my camera and then there is no way for me to access its functionality. These udev rules don't seem to help me a bit. Does this mean I have to change something in my camera to allow it to work? I'm searching some more.
EDIT: Basically what I want to know is: can I change this? Is there a way for me to connect my camera to the Pi and have it be able to take pictures/zoom via PTP?
Does the camera screen go black when you plug the camera in? If so, the udev rules are almost certainly the problem. Unfortunately, this udev stuff isn't well documented and not every distro does everything the same way, so it's hard to give specific instructions.
Note that if you set up your pi without a desktop, these rules probably will not be a set up (I didn't have a problem with them on the pi I use for building). The chdkptp GUI may be nice to for initial development, but for automation you probably want to use the cli anyway.
The "right" way to this is using the udev rules and hwdb, but killing some gphoto / gvfs processes before connecting the camera might work too.
I have looked up the documentation and it's not helping me one bit...
As of right now I have my pi setup with a desktop, but since I plan to simply send my Pi a command and have the Pi in turn send the camera a command, I don't necessarily need a desktop. Since I am new with both CHDK and the Pi, where should I start for using the PTP with a headless Pi?
If you read the forum post I linked to, it should give you enough to find the relevant files. The exact names may vary by distro, but they should be similar.
CHDKPTP_DIR=".... blah.... /chdk-ptpChange the ...blah... to match your own installation.
Started by Barnacules
Started by Peterschnecke
Started by ernway
Completed and Working Scripts
Started by mrboop2
Started by phantom2041
General Discussion and Assistance