The ProCamera not take picture?

Hi all.
here I like to have ESP32 BLE send 'TAKE_PICTURE' and the APP to directly take a picture and saved, didn't get there.
need help please.
Thanks

p110i_esp32_ble_O_CAM_Nb (1).aia (249.4 KB)

What have you debugged ?

image

Suggest you set a notifier here to check that the message has reached and started the clock timer.

You should also check that that the procam is initialised

You also appear to be setting a procam output to a diferent location for the "second" and subsequent images ?

1 Like

First, rework your Screen.Initialize blocks, especially the arbitrary (pointless) request for permissions (which, moreover, no longer exists for WRITE since Android 11).

The process of requesting Bluetooth permissions has been explained many times here in the forum, not least by me.

1 Like

Thanks.
actually, I made it like this, still:

  1. camera doesn't come out;
  2. not take pictue;
  3. i set the camera come out when APP run, failed why?
  4. add some noties in Screein1.PermissionGranted, didn't see pop out:

Thanks.
I rewrite the screen,Initialize no much changes.

  1. the BLE works well, added notifier in 'TAKE_PICTURE' got pop;
  2. seems other permissions did granted?
  3. come up allow ... access photos: DENY ALLOW need select, why not just grante the permission?

See here:

Do not ask for all permissions at the same time!
See here about how to ask correctly for Bluetooth permissions

And move the lower part for example into a button click event

Taifun

1 Like

For Procam functionality, make a separate, simple as possible example aia project. does that take a picture ?

1 Like

thanks.
I'll test that.

the global.device is for ESP32 BLE connection, I try to use ESP32 BLE to control the ProCamera to take picture not success.

thanks.
that code was working well to take picture and save it.

  1. I made changes try to use only one button and moved ProCamera ini into screen1.ini, it works for the APP first time run, the camera doesn't come up when APP restart.

  2. problem here is about try to use ESP32 BLE control the ProCamera to take picture, I added the well run ESP32 BLE blocks onto it, it doesn't take picture now.

If you are getting plain black images taken, you may need to set a timer to give everything time to setup.

I did a small test, using firebaseDataChanged with a node value of true/false - if true take a picture.

I left this value set to true, and refresh the companion, and got a black picture. Adding a clock with a time interval of 3 seconds, on refresh it took a picture

1 Like

Thanks.
I am trying to test it, where did you get: call.File1.MakeFullPath?

Try the file component
Taifun

1 Like

great.
Thanks.

Sorry.
where can find : firebase db?

Experimental

but why not try a timer with your existing code and the ESP32 ?

1 Like

Thanks.

I tried to use clock like this, just can't make it work. this one crashed, why?

You need to ask for camera permission before you try to initialise procam.
You should initialise procam before you start the clock, which is to take the picture.

1 Like

Thanks.
I made the blocks borrow you picture and added 3000, got white screen at first start, and black screen at restart.
how to fix?
any where have a example that MIT APP received ESP32 siginal to take picture?

If this is with a compiled app, then you might need to restart because I was lazy with the permissions request.

Is your firebase setup correctly to return true or false for a tag called take ?

Sorry, can't help with ESP32.

1 Like