-
Notifications
You must be signed in to change notification settings - Fork 47
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
Enabling UART mode #22
Comments
0x51 is 0xA3 shifted 1 bit right. it is the same 7-bit adress. p.s. my camera do not have any activity on i2c overall, always logic 1 on SDA/SCL |
@RagnarJensen , that wonderful ! Is there any way we can talk about all of this, and if possible if you can help me make it work my side, off course if you need something in compensation (wink, wink) I'm okay with that's. |
I totally forgot this post that I opened. I have it also working. To test it I just used a simple vb .net program to test some functions and more or less was working. Good luck! |
@garciaanto could you show the sketch? |
Sure:
|
@garciaanto do you have a wiring Shem for the Arduino ? |
Not sure if I understand your question. If you ask regarding the connections: CAM side Arduino side If you want, you can also power up the arduino with the cam (CAM VCOM to Arduino Vin) |
@garciaanto, that's it. On your sketch, where do I need to put my code ? For example if I whant to focus forward or backwards ? |
Is it even possible to do this ? Because that really one thing that I need, be able to manually focus thought the I/O port... |
@garciaanto did you find a way to manually focus with it ? Don't seem to find the code to use... |
@CGFlyer85 wait wait... Once the cam is in UART mode, you can send commands to TX RX. You can find all availables command in " Z-Camera-Doc/expansion/expansion.md" You can do that with arduino, or with vb .net or any other app. |
@garciaanto would you mind posting some simple example Arduino code using the commands from the Github "Z-Camera-Doc/expansion/expansion.md"? For example, changing from the default video mode to stills mode? If I can connect to the Z-CAM via I2C without having to use an EEPROM, that would be amazing! |
@RagnarJensen You have made some excellent progress in the area of manually focussing the camera via UART commands. Would you mind posting your order of commands from camera startup to manual focus at infinite? Even better (and perhaps more convenient for you), some code would be excellent for this procedure. My plan was to do something like the following:
|
@RagnarJensen I noticed that in your focus commands, the third byte is 0x07, whereas the UART documentation says the third byte in UART SET CONFIG commands should be 0x04. Is there any reason for you changing it to 0x07? |
@MechtEngineer The third byte is the length of the command or the response. E.g. in the GET CAMERA_CONFIG_LENS_FOCUS_POSITION command it is 0x02 and in its response it is 0x13. I have no idea what the set MF drive command is supposed to do. I've only looked at it briefly, but I think I saw the focus position in the responses. And in their example, the length byte of it seems to be wrong. |
I have actually never written code for an Arduino before... 😳 This is my very first attempt ever, so go easy on me... I have a couple of Teensy 2.0s left over from another project. I didn't write any code for them, other people did. I just integrated stuff. The Teensy is a very close relative to the Arduino, it uses the ordinary Arduino IDE for coding stuff. So, I thought "how hard can it be?" Yes, famous last words, I know 😉 It turned out not being too hard after all. I have managed to slap together a proof-of-concept sketch that actually does some things OK. From the comments in the code:
The code so far is of the "ugly hack" variety. It's definitely not pretty, but it may serve as an example for how to do UART communications with an Arduino. I have set up a repository where I will publish the results of my experiments. You can find the sketch there.
-- |
I've been messing around with my Arduino code and have now pushed a new sketch to my repo. It can do everything the earlier one did, but I've added analog input. From the comments in the code:
The code is still ugly as sin. I'll clean it up later. Maybe... 😀 Cheers, Ragnar |
@RagnarJensen Wow! This is absolutely magnificent! Thanks for all of your effort in posting your code and circuit. Outstanding stuff. I salute you! |
Using flash with the E1. That's the reason I got interested in the I/O port, the API and UART control in the first place. I've been mucking about with my Arduino code and I've added a resistor and a transistor to the breadboard. I can now trigger a flash from the controller. There are limitations, though. The electronic shutter's slow read-out speed and delays of varying duration in the camera make for some interesting challenges. Head over to my repo for more info.
@Chenel000 Thanks for the postcard 😄 |
Nice you like it @ @RagnarJensen |
Currently I am working on building my drone where I expect to fly the Z E1 cam and use the connectors you send me, and really I miss to have time now to work on the programming side to configure and manage the camera. I expect soon to be able to join the team to work on this but first I need to finish with the flying platform. |
Hi,
Thank you in advance for any hints and help. Giuseppe |
Hi,
In the documentation is shown the address 0xa3 for the external eeprom must be used.
I have implemented a kind of "sniffer" for the i2c and what I see is different:
If I answer with the Byte 0x03 (uart mode) in the first query nothing is happens
If I answer with 0x03 to all the queries the cam do not start, so its power on but nothing in the display (frame, layout...)
Any help?
The text was updated successfully, but these errors were encountered: