[EDIT] Here is a build log of mini-variant of this device.[/EDIT]
One of my favorite shooting techniques is focus stacking. Many pictures on Circuits@Home site are made using this technique. I use Helicon Focus for post processing and even though this program has camera control built-in, it obviously requires a computer close to the object of shooting. In order to be able to control my camera in the field, I wanted to replace a laptop with simple lightweight controller able to move focus of camera lens and take pictures between steps. In this article, I will show how to build one from Arduino, USB Host Shield and several small parts.
Finished circuit can be seen on the title picture. As you may already have guessed, the sequence of shots used to produce the picture has been made with the very unit depicted on it. Focus stacking assistant is controlled by 3 buttons: first moves focus towards the camera, second moves focus away from the camera, third button starts shooting sequence. Long press on focus move button sets “near” of “far” points, after both points are set shooting sequence can be run – it always starts from “near” point. The sequence can be stopped at any time by pressing on any of focus move buttons. It is important to understand that after a point is set, subsequent focus moves must be performed with focus move buttons only.
The controller can also be set to “free run” mode. Long press on third button starts shooting sequence from current lens position (which in this case can be set by hand using lens’ focusing ring) towards infinity and will run indefinitely. It can be stopped at any moment by pressing on a focus move button.
A single LED shows states of the controller. Short blink once a second indicates “idle” state – controller is connected to the camera, PTP session is open. Continuous frequent blinking means some kind of an error – most likely, controller not being able to initialize the camera or open PTP session. 3 short blinks act as a feedback to long press, focus move, etc. Additionally, more detailed diagnostic is output to Arduino serial console.
Even while connected to the camera, Focus Stacking Assistant allows camera buttons to function as usual. For example, camera LCD can be turned on and zoom area can be moved to the area of interest and then zoomed in to help focusing. Shooting mode, as well as aperture/shutter speed/ISO can be changed. It is also possible to access or erase images on the card and perform other manipulations as necessary.
Let’s now talk about how building the assistant. Links to Arduino board and USB Host Shield has been given at the beginning of the article, refer to USB Host Shield hardware manual for connection instructions. The protoshield is also handy, I prefer ones from Adafruit, maybe I’m just lucky but I’m always receiving blue ones which match nicely with Arduino and host shield. You will also need some wire, a LED, current-limiting resistor (Adafruit sells all of that), and 3-4 tactile switches. The connections can be figured out from title picture, here is “formal” schematic just in case.
The control software is hosted on gitHub. It depends on USB Host Shield library r.2.0, PTP library r.2.0 and Quantum Leaps state machine framework AKA QP (the code uses standard Arduino variant of QP from Quantum Leaps site, not the modification made for PTP library examples!). The state machine design has been made using QM modeling tool and model file is included in the repo for your viewing pleasure.
The code has been extensively tested with Canon 5D Mark II and XSi cameras, it should work with any Canon DSLR with LiveView function. The code is in beta, it is a little slow and maximum exposure time is around 1-2 sec depending on the camera and lens model. In coming weeks I’m going to build and test Mini variant of the circuit and write code for Nikon DSLRs. As always, stay tuned for the updates and if you build this circuit, please share your experience in the comments!
Oleg.
I would be interested in purchasing one premade but also have had the need for something similar for a photograph I would like to accomplish. Please email me to discuss!! Thanks 🙂
Aaron
this is great! I’m watching and waiting for the Nikon code. Keep up the good work!
I’m also watching and waiting for the Nikon code.
I spent some time exploring Live View on Nikon DSLRs. It seems to me that Nikon is very protective of camera LCD display and turns it off whenever possible. If PTP session is open and LV is turned on from the sketch, the LCD gets turned off and camera buttons won’t work. The same is true if I connect external monitor via HDMI – no output if LV was open via PTP.
I can move focus and take shots with not much difficulty, however, it won’t help much because I can’t see an object I’m shooting and therefore can’t focus. I checked several PC remote control programs for Nikons – they all shoot with LCD off. All – if you know about a program which can shoot tethered with camera LCD on, please let me know!
Thank you,
Oleg.
Hello Oleg
One question for you before I build one of these. What determines the size of the focus change between pictures? Is it set to what ever the smallest change is the camera can make?
Apologies if it is in the code somewhere…I am new to the Arduino so am not the best at reading code…!
Thanks in advance
Dave
Steps are set in https://github.com/felis/FSA-EOS/blob/master/fsa.h , lines 75,76.
Oleg, I cannot get my canon 5d mkII to change focus at all. I am using the “Eos.MoveFocus(3);” command. Does the camera need to be in a certain mode? I am using a 70-200mmL lens, and its in auto focus mode, but i cant get it to change no matter what I do. The other functions seem to work. Do I need to be in live view for it to work? Has anyone done research on repeatability or controlling the focus using an encoder? I hope to be able to send the focus to a value or do something like velocity control over it, so my software can ramp it up and down. In order for this to happen I need to poll its position. Is this possible?
Thanks
Jason
If you’re talking about this sketch -> https://github.com/felis/PTP_2.0/blob/master/examples/Canon_EOS/EOSFocus/EOSFocus.pde , it should work with 5dm2; I checked it with mine. It switches LiveView on then tries to move focus. It won’t turn LCD on on 5dm2, but you can turn it on manually.
You may have issues if your lens motor is too slow. I checked it with 180/3.5 macro, which is quite slow and it worked. I don’t know how slow 70-200 is. You may want to increase delay in line 76 to see if it makes any difference.
Canon focus move commands have no feedback. You will always receive OK, even if the lens is at the end of travel. There is no way to learn lens position. I’m working on external feedback circuit for Canon lens, but it is currently in early pre-prototyping stage.
Oleg, I remember playing with the magic lantern software with the focus rack command, and it looked like it was reading back some sort of number. When using your focus stacking, you just bump the focus each time a certain distance? Is it possible to connect the focus to an encoder without any feedback? Would the focus be repeatable?
Thanks
ML probably has access to internal camera data. Focus position is quite repeatable if you don’t send focus move commands too fast. It should work with the encoder just as it is working with buttons.
Has anyone done a sketch to do simple focus control of the canon using an encoder? I would like to see how this is done and possibly try it out.
[…] Focus stacking assistant for EOS cameras @ Circuits@Home. Oleg writes… One of my favorite shooting techniques is focus stacking. Many pictures on Circuits@Home site are made using this technique. I use Helicon Focus for post processing and even though this program has camera control built-in, it obviously requires a computer close to the object of shooting. In order to be able to control my camera in the field, I wanted to replace a laptop with simple lightweight controller able to move focus of camera lens and take pictures between steps. In this article, I will show how to build one from Arduino, USB Host Shield and several small parts. […]
I modified the bps.cpp to work with the Sparkfun Joystick four button shield.
#define BUTTON_MASK 0x70 // 1110 0000 was E0 now 0111 0000
…
#define N_MASK 0x10 //near button D4 was 80
#define F_MASK 0x20 //far button D5 was 40
#define G_MASK 0x40 //go button D6 was 20
What I’m wondering is what should I see my camera (XSi) do. When I press D6 button it takes a
photo but thats it. Should AF be on or off? When I press the Near or Far should the focus ring move?
Is there a tutorial on how and what the FSA sketch does?
Thanks for a great board and software.
AF should be on. Near button moves focus towards the camera, long press sets near focusing point. Far button operates similarly but in the opposite direction. The focus ring may or may not move depending on the particular lens’ construction.
Sorry to be a pain but I really want to make this work. I am not intimately familiar with my wife’s XSi. I’ve tried both the EFS 18-55mm and the 70-300mm (says Macro 1.5m/4.9ft) and I get the following:
Start
EOS Init
PTP Init
Addr:: 0001
NI:: 0001
PTP configured
Session opened
Init complete
Fatal USB Error
Transaction: Response recieve error: 0004
Transaction: Command block send error: 0004
MoveFocus error: : 2002
AO_Commands: Focus Step failed: 2002
ASSERT – line 1291
Start
EOS Init
PTP Init
Addr:: 0001
NI:: 0001
PTP configured
Session opened
Init complete
Camera offline
I own XSi and this code has been extensively checked with it; in fact, about half of the pictures posted after FSA article has been made with this cam. Try the code unmodified and see if it makes any difference.
Oleg I am try to build a focus-stacking-assistant for my nikon what code do you have. Could I get a copy?
I have looked in to the code for Nikons and the LCZD is set to go off any time you in php mode,
I am thinking about how to get around this. it does not bother me to much as I am using Camera Control Pro to shoot tether.
Focus move commands for Nikon can be learned from NKLiveView -> https://github.com/felis/PTP_2.0/tree/master/examples/Nikon/NKLiveView . I don’t have Nikon FSA code.
Oleg,
This is very interesting. I’ve only found out about focus stacking. Is there a library of photos that have been taken by this device?
Thanks
Victor
Many pictures on this site have been made using focus stacking technique.
Hi Oleg – Thank you for all the hard work. I’ve been experimenting with your code. My 5dmk2 flips the mirror up and start live view, but the lcd does not tun on. Have you come across this before?
Also, is there any documentation on talking to the GPIO pins?
S.
Press LiveView button on the camera to see the LCD. Or you can
SetProperty(EOS_DPC_LiveView, 2)
thenSetProperty(EOS_DPC_LiveView, 1)
– AFAIK, works on 5dm2 only.Use
gpioWr()
andgpioRd()
to access GPIO.it works for 7d as well. thanks! I’ve googled in for whole day!
The info about “Or you can SetProperty(EOS_DPC_LiveView, 2) then SetProperty(EOS_DPC_LiveView, 1)” to switch on live view also helped on the 550d – thanx 🙂
Thank you! (and Happy New Year!)
I am a new user Arduino and my knowledges of language C/C++ is very very basic. I have bought all the items for your very interesting Focus stacking project.
I have compile you sketch FSA_EOS and have follow error :
bsp.cpp:185: error: variable or field ‘onIdle’ declared void
bsp.cpp:185: error: ‘QF_INT_KEY_TYPE’ was not declared in this scope
I have the last version Arduino 1.0 and the latest qp_arduino.zip (with qp_port.h version 4.3.00).
Can you help me.
Thanks and Happy New Year.
Have you tried to run examples from QP package? I think QP was written for pre-1.0 versions of Arduino IDE as well as PTP and USB libraries. Try to compile it under Arduino-0022.
Thanks for your quick response. I tried the examples in 1.0 (qm_pelican, qp_pelican and qp_dpp) same error, I compiled FSA_EOS under Arduino-0022 and have the same error. I don’t see what I did wrong, maybe is the last version of the file qp_arduino.zip (QP package) incompatible?
There is a discussion about it on the support forum -> http://sourceforge.net/projects/qpc/forums/forum/668726, please take a look.
Hello,
Quantum Leaps says me to change bsp.cpp:
To bring it up to QP 4.3.00, you need to change the QF::onIdle() function in the bsp.cpp file as follows:
Code:
void QF::onIdle() {
#ifdef SAVE_POWER
SMCR = (0 << SM0) | (1 << SE); // idle sleep mode, adjust to your project
// never separate the following two assembly instructions, see NOTE2
__asm__ __volatile__ ("sei" "\n\t" :: );
__asm__ __volatile__ ("sleep" "\n\t" :: );
SMCR = 0; // clear the SE bit
#else
QF_INT_ENABLE();
#endif
}
The exemples of QP works now, the problem was that FSA_EOS was in the same directory /libraries/ of Arduino and when I compile the examples they takes the bsp.cpp from the FSA_EOS. I move now FSA_EOS, PTP-2.0 and USB_Host_Shield_2.0 in the sketchbook location (this was a newbie error). I think you have made the project in a previous version of Arduino IDE maybe 0022 or 23 and a previous version of QP. The new IDE version 1.0 has important changes, but not documented.
After corerection of bsp.cpp, I tried FSA_EOS again in Aduino IDE 1.0 and 0023 with QP 4.3.00 (I don't find a previous version), but have now messages : Usb.h: No such file or directory, message.h: No such file or directory… I have no time to this week to find the reason, my knowledge of language is C/C++ is very poor. I will look next week on internet if there is some documentation. Thanks.
I updated FSA and PTP to work with Arduino 1.0 and QP 4.30
Thanks for this update, it’s work fine.
Hi, i’m trying to move both EOS focus and a servo motor with duo fx wii wireless nunchuck.
It works for the first time:
when change joystick value it move focus or it move servo (holding C button)
But when i release C button it freezes in EOS.MoveFocus :'(
i used analog pin 3,4 for duofx, and analog pin 1 for the motor.
You know if there is interference between the shield and the analog pins?
P.S. Sorry for my english.
USB host shield doesn’t use analog pins and they are on a separate port. Something else might be interfering.
duo fx reciver and the motor are connected to 3.3V and 5V pin respectively. This can affect the shield?
Hi, I am connecting Canon 60D to this example.
Board is Seeduino v3.0 (ATMEGA 328P)http://www.seeedstudio.com/depot/seeeduino-v30-atmega-328p-p-669.html?cPath=132_133 configured to defaults (5V).
I am getting:
Start
EOS Init
PTP Init
Addr:: 0001
NI:: 0001
PTP configured
Session opened
Init complete
<>
Fatal USB Error
Transaction: Response recieve error: 0004
Transaction: Command block send error: 0004
MoveFocus error: : 2002
AO_Commands: Focus Step failed: 2002
Transaction: Command block send error: 0004
Transaction: Command block send error: 0004
MoveFocus error: : 2002
AO_Commands: Focus Step failed: 2002
Transaction: Command block send error: 0004
Transaction: Command block send error: 0004
MoveFocus error: : 2002
AO_Commands: Focus Step failed: 2002
Transaction: Command block send error: 0004
Transaction: Command block send error: 0004
MoveFocus error: : 2002
AO_Commands: Focus Step failed: 2002
Transaction: Command block send error: 0004
USB Host Shield rev2.0 (07 Dec 2010)was assembled with defaults as shipped and pins 9 and 10 connected using the soldering pads
Anything that should be done?
Same shield same board and connected to Canon PowerShoot SX210IS I am getting the below on connecting the camera:
Start
EOS Init
PTP Init
Addr:: 0001
NI:: 0001
PTP configured
Session opened
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Response recieve error: 2005
SetPCConnectMode failed: 2005
Transaction: Command block send error: 000E
SetPCConnectMode failed: 2002
Camera offline
The shield is working fine, it’s the camera which NAKs all the time. I’m not familiar with 60D, maybe it uses different command to switch to LiveView?
I need all my powers of memory and common sense to try and build what seems to be the ultimate tool for serious focus stacking. I very much miss a step-by-step building/set-up instruction for those of us who cannot (yet) translate electronic schematics in our heads into practical soldering instructions.
I hope the phrase “The connections can be figured out from title picture” was not meant to scare of the lesser electro-wizards among us…. as I can make heads nor tales from them. In Europe/Netherlands the right parts are hard to come by, so for example I have to work with some products from Sparkfun that do no at all look like the photo’s on the estimed forum/blog…
My aim is not to critisize, it is to participate…. if I can.
There is only one way to connect an Arduino shield to an Arduino. You also need to wire 3 switches and one LED to Arduino pins. The schematic is posted, if something on it is not clear – ask specific questions. Links to parts you’re using will help too.
I have tried to respond 3 times but my message keeps getting lost.Can you mail me your mail address?
Make that 4 times.
>>Michael,
The USB shield you have is not compatible with my code.
Regards,
Oleg.<<
Oh…..
That is a very substantial setback for me! Particularly since the nearest place I can get your USB-shield is a firm in Germany which is closed until Wednesday next and where the boards are out of stock until next week.
I'm very disappointed that I could not see on the website/blog that even in such a user-friendly project as Arduino the same names can point to ENTIRELY different things. Perhaps a bit more warning….? After all, many people like me land on your pages because they google "Canon/focusstacking/control/remote/assistant etc. Still, I am very happy I found it, so for now there's Nothing left for me but to start waiting and waiting again.
Bye for now.
Michael.
What kind of warning would you like to see? That my code doesn’t work with clones?
That seems to sound offended, which was by no means intended. All I am pointing out is that it is very hard for people who are new to the world of Arduino -as I suppose most of us once were- to even KNOW that there is such a thing as a clone. After all, that term is usualy reserved for imitations of copyrighted products, whereas the Arduino rightly prides itself on being Open Source hard- and software. I suppose that is why Ladyada puts it this way on her site:
<>
quote was: The Boarduino is an Arduino clone
Hi Oleg,
Finally got my hands on the right USB-shield, so I’m now ready for the software bit. Couldn’t find what code from github I need to get started focus stacking – there are many files there with names that mean nothing to me. I just want my 5DII to get busy with my 100mm/2.8 macro. Once I get it all going, I will take a good look at the smaller version you developped. Can’t wait to get started!
I’m starting to lose hope here. I have tried almost 50 ways to install the software, the libraries, what have you. But streams of error messages keep popping up. Perhaps there is a wonderful step-by-step tutorial somewhere that I missed, but I might as well kill the whole project after so many hours. So kindly help.
Step 1 is to install QP and make sure it works (there is a sample app in the distro) -> http://state-machine.com/arduino/index.php This step is necessary for FSA code to compile; also, the included documentation is excellent – if you read it, you won’t have any issues. Come back for step 2 when done.
Hi Oleg,
Yes, I installed QP and it works. It is very well documented indeed. So what will be the next step?
The next step is to install USB Host shield 2.0 library from here -> https://github.com/felis/USB_Host_Shield_2.0/downloads . The root directory name in the archive will be weird, you may want to rename it to something like ‘usbhost’ after extracting. Move the extracted package into Arduino libraries directory and run some example sketches (from its own ‘examples’ directory). ‘board_qc’ will do hardware check of the usb host shield and USB_desc will print device descriptor of the USB device connected to the shield.
Next you’ll need to install and check PTP 2.0 -> https://github.com/felis/PTP_2.0 similar to QP and USB Host 2.0. Finally, copy FSA-EOS to your disk -> https://github.com/felis/FSA-EOS . It is not a library so you can copy it anywhere on the disk. The directory name must be ‘fsa_eos’. Compile the sketch, run and see if it recognizes your camera. After that you may want to connect buttons and LED to interact with the sketch.
Let me know if you have issues.
Hey, oleg!
You have done a great job with the library. There are great features to set your photo remotely, but I need to start/stop movie recording with my Canon5D mkII. I tried to search for its opcode with no success. Do you know how can I solve it, or where can I find some documentations about the vendor extension codes for this model?
–Thanks in advance!
The property is 0xd1b8, value of 4 starts video, 0 or 3 stops. Prior to issuing these commands camera needs to be switched to LiveView mode.
Thanks for response! It works great but when I initate recording, the LiveView turns off, so I can’t see what I’m recording. In an earlier post “dslrrc – another Arduino+Android wireless EOS controller” ‘s youtube video there is the LiveView still on while movie recording. Unfortunately this project’s googlecode gives me an error 403, so I can’t access that code to find the solution. Do you know how can I manage the camera to has liveview while it’s recording?
–Thanks in advance!
Which camera model are you controlling?
I’m using Canon 7D and 5D mkII also.
With the 7D there is an other issue also: sometimes it asks me to press START/STOP button to activate movie shooting. When this screen appears the camera don’t responding when i set the record start property.
For 5Dm2 you need to do
Eos.SetProperty(EOS_DPC_LiveView, 2)
followed byEos.SetProperty(EOS_DPC_LiveView, 1)
to activate LCD screen. I don’t remember any issues with 7D, don’t have it at hand ATM to check, sorry.Hi Oleg,
Thanks for pointing me in the right direction. If you’re not too familiar with the enormous variety of Arduino possibilities, the simplest things can be very confusing. Still, I hope my newby questions can help others. I sent you a first stacked picture (Helicon)by mail, since I don’t think I can do that here.
A technical question concerning flash. Depending on temperature etc. my (ring) flash doesn’t always recharge as quickly as I would like. I therefore wondered whether there is a delay setting in any of the code files that can be adjusted to change the time between consecutive shots.
Thanks again,
Michael.
Congratulations! You’ve made it.
The delay between shots is defined in
commands.cpp
line 42 ->https://github.com/felis/FSA-EOS/blob/master/commands.cpp#L42 It is set to 3 seconds.I looked at your picture. It seems that Helicon is confused, you are probably feeding it pictures with too much overlap of “in-focus” area between them. Try to open up the aperture a little and see if it makes any difference.
Problemma. I have IDE 1.0.1 and QP version 4.5.02. Get the error. QP version 4.3.00 on the Internet is not found. Examples USB_Host, PTP and QP compiled without problems.
https://sourceforge.net/projects/qpc/files/QP_C%2B%2B/4.3.00/
http://www.state-machine.com/arduino/qp_arduino_4.3.00.zip
I was able to find the old version. Now I have another bug report. Still need your help.
I have IDE 1.0.0 and QP version 4.3.00
core.a(new.cpp.o): In function `operator delete(void*)’:
D:\arduino-1.0\hardware\arduino\cores\arduino/new.cpp:10: multiple definition of `operator delete(void*)’
qp\qp_port.cpp.o:D:\arduino-1.0\libraries\qp/qp_port.cpp:45: first defined here
Problem here?
—
void operator delete(void *) {
Q_ERROR(); // this operator should never be actually called
}
—
It did not help! http://www.circuitsathome.com/chome_downloads/qp_port.cpp
You are mixing sources. For the Focus Stacking Assistant you need unmodified QP for Arduino and remove all other variants from the source tree.
I do not mix. Error described above is present.
Please compare the contents of your file qp_port.cpp and file link http://www.state-machine.com/arduino/qp_arduino_4.3.00.zip I see no other reason for the problem.
it is not for Arduino. what to take and which folder to move. Please explain. 3 days I can not figure out how.
Let me download your libraries QP!
The disappointing result!
Arduino v1.0.0
Libraries: PTP v2.0, USBHost v2.0, qp v4.3.00
FSA_EOS Arduino IDE 1.0 and QP 4.30 compatibility
All set to completely clean computer! Error message:
core.a(new.cpp.o): In function `operator delete(void*)’:
D:\arduino-1.0\hardware\arduino\cores\arduino/new.cpp:10: multiple definition of `operator delete(void*)’
qp\qp_port.cpp.o:D:\arduino-1.0\libraries\qp/qp_port.cpp:45: first defined here
No tangible benefits! Purchased cost USB Host wants to throw…
What are the suggestions and recommendations?
Are QP examples compile OK?
For the version of IDE 1.0.1 and QP 4.5.02 all is well.
For the version IDE 1.0.0 and QP 4.3.00 errors:
bsp.cpp:31:22: error: WProgram.h: No such file or directory
bsp.cpp: In function 'void BSP_init()':
bsp.cpp:65: error: 'Serial' was not declared in this scope
bsp.cpp: In function 'void BSP_displyPhilStat(uint8_t, const char*)':
bsp.cpp:109: error: 'Serial' was not declared in this scope
bsp.cpp:110: error: 'DEC' was not declared in this scope
If the correct file bsp.cpp
/ / # include "WProgram.h"
# include "Arduino.h"
We get the same error as it was for FSA_EOS
core.a(new.cpp.o): In function `operator delete(void*)':
D:\arduino-1.0\hardware\arduino\cores\arduino/new.cpp:10: multiple definition of `operator delete(void*)'
qp\qp_port.cpp.o:D:\arduino-1.0\libraries\qp/qp_port.cpp:45: first defined here
go back to Arduino 0022 then.
IDE 0022, qp 4.3.00
QP examples without problems
FSA_EOS The following errors:
In file included from D:\arduino-0022\libraries\USBHost\SPP.cpp:18:
D:\arduino-0022\libraries\USBHost\/SPP.h:109: error: expected ',' or '...' before '*' token
D:\arduino-0022\libraries\USBHost\/SPP.h:109: error: ISO C++ forbids declaration of '__FlashStringHelper' with no type
D:\arduino-0022\libraries\USBHost\/SPP.h:115: error: expected ',' or '...' before '*' token
D:\arduino-0022\libraries\USBHost\/SPP.h:115: error: ISO C++ forbids declaration of '__FlashStringHelper' with no type
D:\arduino-0022\libraries\USBHost\SPP.cpp:725: error: expected ',' or '...' before '*' token
D:\arduino-0022\libraries\USBHost\SPP.cpp:725: error: ISO C++ forbids declaration of '__FlashStringHelper' with no type
D:\arduino-0022\libraries\USBHost\SPP.cpp: In member function 'void SPP::print(int)':
D:\arduino-0022\libraries\USBHost\SPP.cpp:726: error: 'ifsh' was not declared in this scope
D:\arduino-0022\libraries\USBHost\SPP.cpp: At global scope:
D:\arduino-0022\libraries\USBHost\SPP.cpp:762: error: expected ',' or '...' before '*' token
D:\arduino-0022\libraries\USBHost\SPP.cpp:762: error: ISO C++ forbids declaration of '__FlashStringHelper' with no type
D:\arduino-0022\libraries\USBHost\SPP.cpp: In member function 'void SPP::println(int)':
D:\arduino-0022\libraries\USBHost\SPP.cpp:763: error: 'ifsh' was not declared in this scope
Now you’re hitting incompatibility of current version of USB Host Library to Arduino pre-1.0. I don’t do revisions, you need to rollback from commits at github. You can also try to remove offending files which are not necessary anyway, in this case, SPP.*.
Binary sketch size: 19140 bytes (of a 32256 byte maximum)
Will test … )))
Thanks!
Hi Oleg,
I was able to move focus by the function of CanonEOS::MoveFocus(uint8_t number).
but now, I want to Realize automatic focus,how can I do? Thanks!
You don’t need to do anything – automatic focus happens automatically when you perform capture.
thank you !
but sometime I just want to realize automatic focus
I found an command 0x9128 can realize that.but can only realize once.if I want to realize second,I must reboot arduino.
Hi Oleg,
Canon camera in liveview mode,I want to move the focus dialog box up/down/left/right,what command should I use?
thank you!
Can you help me!
I don’t know how to do it, sorry.
Thank you!
Today I realize that,
#define EOS_OC_ZoomPosition 0x9159
uint16_t CanonEOS::FocusBoxMove()//2012.11.15
{
uint32_t params[2];
params[0] = FocusBox_x;
params[1] = FocusBox_y;
return Operation(EOS_OC_ZoomPosition, 2, params);
}
Hello Oleg,
When Canon Eos camera in liveview mode ,what command can control camera StartShootingMode and
EndShootingMode?
Thank you!
Hello Oleg,
When Canon Eos camera in video mode ,what command can control camera StartShootingMode and
EndShootingMode?
Thank you!
..
Look in the comments.
Hello Oleg,
I’m trying to build focus control, and capture,
Now I,m using PTP 2.0 EOSfocus base, I have Focus and capture work, Eos.capture(), However Capture will do auto focus, Have a easy way to have command capture without auto focus, I’m not familiar with C++ class….
many thanks
Trans
You need to switch to LiveView or switch lens to manual focus. There is no command prevent a camera from auto-focusing.
Hello Oleg,
Many thanks for replay, yes, its already switch to LiveView mode, auto focus is still perform,
Lens witch to manual , USB focus will not work.. however thanks again for help.. i need future studying,,, by the way , Canon EOS utility have capture on liveView with no autofocus, I just can’t retreve the cammond commend,,,,
Best regards Trans
I don’t do anything special in Focus Stacking Assistant and it 100% doesn’t autofocus when doing capture in LiveView. What camera are you using?
Hello Oleg,
I found EOS Utility control panel have a switch to switch auto/manual, when liveview activate the manual is set, however, PTP2.0 LIb switchLive may not perform this setting,,,,
best Reagrda
Trans
Hello Oleg,
I’m using EOS 650D, I may try 5D3 later,,, Focus Stacking Assistant may fulfill my need,,,
but I have difficulty to compile it for now….
Best regards
Trans
Hello Oleg,
after many many try, I tested 4 L lens can have usb focus control at lens set to manual focus,,
however the cheap lens come with 650D 18-55mm is II is not work with switch at manual position,,
I can temporary use at this condition, hope someday can use USB like eos uitilty to control auto/manual on USB
Best regards
Trans
Hello Oleg,
Can you tell me,what command can make me get the camera current liveview status,
is LiveView on or LiveView off?
Thanks!
I don’t know if such a command exists. You should get error while attempting to move focus if Liveview is off.
thank you all the same!
I think 1100d and 500d model id are different.
I have an other question is what command can get the camera model Id?
Thanks!