Notifications
Clear all

ESP 32 Cam based android application help

15 Posts
4 Users
3 Likes
2,426 Views
(@biprav)
Member
Joined: 10 months ago
Posts: 4
Topic starter  

Hello everyone.

 

I'm working on a project where I want to develop an ESP 32 Camera based system that can take images for microscopic imaging purpose using an OV5640/OV2640 camera. I want to control the system wirelessly using an Android phone and a custom application. In that regard, can someone kindly help me out in the development of an android application that can control the camera in the ESP32 module.

I am actually new to the Arduino and ESP 32 platform and I don't have any prior knowledge of app development. Any help in this project will be highly appreciated.

I will be happy and grateful for any help that comes.

 

Thank you so much.


   
Inst-Tech reacted
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6984
 

@biprav I am very familiar with the esp32cam, but I know nothing about android app building. At least it's not for an iPhone, that is almost impossible to do for an individual.

As there are a number of esp32 camera apps floating about, some work well some don't and each has it's quirks, perhaps you can provide a link to which sketch you plan to use or several links to several candidate sketches and we can discuss pros and cons.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6984
 

@biprav Can you elaborate on the following? How many years of software development do you have and in what languages are you qualified? Then we will have a better idea how to help.

I am actually new to the Arduino and ESP 32 platform and I don't have any prior knowledge of app development. Any help in this project will be highly appreciated.

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

@biprav,

Depending on the answers to @zander 's questions, you might want to consider, first going through a tutorial and get your ESP32-CAM board working.  Although this YouTuber really needs to lay-off the caffeine/coke and have his hands tied down, he does a thorough job of explaining how to do at least the ESP32 side.  The software highlighted has lots of features and is web based, so it is controllable from an Android phone (as well as real computers) without having to learn how to write Android native code.  

If the web base, browser version does not meet your end-goals, you can itemize those reasons.  We might be able to point you in the right direction.  

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Ron reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6984
 

@inq @biprav,

Keep in mind this is a sales video for Brilliant. They are an internet educator and may produce good stuff, but they are promoting a lot of stuff they have for sale that you may not need.

HOWEVER, you can download the code from LINK  and it does compile. I added the zip to my WebCams folder (after removing master) and see some stuff I like (mqtt, sound) and some stuff I don't want/need (motion detection, due to power needs)

Stick with the standard boards entry,

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

I do highly recommend the MB board addition, thereby making some of the other parts he has for sale irrelevant. You may need the extender, but when I went looking for it I got confused so I need more time to figure that out.

I STRONGLY advise you produce a NEEDS statement/document as there may be smaller/simpler code bases to work with.

As @Inq says, you don't need an app on your phone to drive this tool, just a web browser.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@biprav)
Member
Joined: 10 months ago
Posts: 4
Topic starter  

@zander Thank you for your response. The main problem is that I don't have any such programming knowledge. This is why I need atleast some preliminary help from people in this forum so that I can try developing the app.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6984
 

@biprav The link you provided is a complete working app. What do you think needs to be changed since it already works just fine?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@biprav)
Member
Joined: 10 months ago
Posts: 4
Topic starter  

@inq Yes, I have actually tried the web server based solution to control the camera which is working fine. 

My main objectives to create an application is to control the camera parameters such as ISO, Exposure time and the digital zoom of the image (say 2x,3x,5x,10x, etc.). I want to control these parameters using the camera app


   
ReplyQuote
(@biprav)
Member
Joined: 10 months ago
Posts: 4
Topic starter  

@zander Thank you for the github link. I will go through it and try it out with the esp32 cam and let you know of the outcome. Thank you.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6984
 

@biprav That was your link, I never heard of it before, I use the 'official' library sources.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6984
 

@biprav With regards to 

My main objectives to create an application is to control the camera parameters such as ISO, Exposure time and the digital zoom of the image (say 2x,3x,5x,10x, etc.). I want to control these parameters using the camera app

Most if not all that is already done. I would not advise digital zoom, the tiny sensor is already quite poor for any meaningful image capture.

 

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

Posted by: @biprav

@inq Yes, I have actually tried the web server based solution to control the camera which is working fine. 

My main objectives to create an application is to control the camera parameters such as ISO, Exposure time and the digital zoom of the image (say 2x,3x,5x,10x, etc.). I want to control these parameters using the camera app

Posted by: @zander

@biprav Can you elaborate on the following? How many years of software development do you have and in what languages are you qualified? Then we will have a better idea how to help.

Posted by: @biprav

The main problem is that I don't have any such programming knowledge.

Let me understand this...  You have the complete web solution working, but it is not going to be satisfactory for your needs.  So you want to learn the Arduino INO and C++ so you can create your own server that will work directly with an Android app say... via Bluetooth.  AND then you want to learn all that is necessary to creating that native Android application, but you have never written any code?

If this is correct... then I would suggest start with Google and look for Arduino programming tutorials, then C++ tutorials and then Android programming tutorials.  You will find that the code in that web version is huge and extremely advanced.  I must be misunderstanding you or you are totally underestimating how monumental that task is for even a decade senior programmer.

Besides... I think you will be disappointed in the results if magnification is what you are after.  OV5640/OV2640

The best resolution of those two are 2592x1944.  Neither of them have an optical zoom.  Therefore at 10x you will only have an effective resolution (of the entire image) of 259 x 194.  Is this acceptable resolution for your project?

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Ron reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6984
 

@inq THANK YOU!

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

I guess my comment can be perceived as being flippant.  It was not my intention.  There are lots of good tutorials and I have seen some YouTube ones that will walk you through building an Arduino app that talks via Bluetooth to an Android App.  I recall it even did a tutorial of how to write the Android app without really explaining things.  It was simply assumed you would only do what they did or you were expert enough to understand and extrapolate for your own needs. 

And there are other tutorials that will let you control the ESP32-CAM.  The CAM interface is extremely detailed and seems like there were a lot of API's you'd have to master.  If you Google very specific aspects like "Arduino ESP32-CAM zoom settings" you might come up with very pointed code that you can study, learn and incorporate into a bigger program.  

I imagine as you get into it and start showing some skin in the game and show specific pieces of code that you are having trouble, we can help you in understanding or even debugging.  

Besides, I'd still recommend you just add the pertinent pieces (zoom, ASA settings) to the existing UNO/C++ server code and to the HTML/JavaScript user interface code and use it with phone, tablet, Windows, Mac without having to learn Android or iOS.

 

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi @biprav,

  A couple of supplementary notes to the many words of wisdom from @inq and Ron @zander.

I haven't checked my thoughts and facts, so please take these notes as suggestions to find out more, rather than hard facts from me, but:

I suspect a lot of the basic video processing, such is image resizing, is done in the camera chip itself, possibly to fixed sizes, etc. that match various industry norms. These may be very useful if they match your requirements, but you may find it hard or impossible to meet your requirements if the chip does not support your needs.

Plus, check the amount of RAM in the ESP32 is enough for any processing you intend to do on it. Depending on the frame size you select, and the algorithms you wish to run, you might not have enough to hold even a single frame, which could preclude some operations.

Of course, as the web server and other examples show, it is possible to do a lot of things with the ESP32 CAM, but to minimise the risk of disappointment, it is worth checking that the hardware has the basic capabiities to meet your aspirations.

Best wishes, Dave


   
ReplyQuote