ToF Imager - VL53L5CX and ESP32

I, too, have gotten the VL53L5CX to run on the SparkFun ESP32 Thing Plus C.

It gives a nice matrix display of numbers in Serial Monitor that change when I wave my hand over it.

Installing Processor was trickier. The first link downloaded the sketch for 3D Depth Map but when I tried to run it, the Arduino IDE complained that it was an old .pde format and did I want to change it to .ino? Yes. That didn’t work.

Then I followed the link to Processor.org and downloaded Processor for my Windows 64 laptop and installed. Then I could either launch the 3D_Depth_Map.pde from Processor, or Right-Click it and “run with Processor”. I modified the code as instructed to my port of “COM4” and ran it. It brings up the red “square” in a black box. Apparently, both processes can’t use COM4 at the same time so I close Serial Monitor on the Arguino IDE running Example4_MasOutput.ino so 3D_Depth_Map can listen on COM4. Otherwise it complains “Error opening serial port COM4: Port busy”. HOWEVER, no changes show up on the red square when I wave over it. I can mouse over the red square and twist and zoom it, so it’s responding. It’s just not displaying! This supposedly works 'cause the SparkFun demo guy showed it on their video with exactly this setup.

JHP

MarkBresler:
I have ben able to run Example 4 Max output on my ESP 32 Thing Plus and see numbers change as I wave my hand in front of it.

I have not gotten the depth 3D depth program to run. My serial port is oddly named : /dev/cu.SLAB_USBtoUART does it need to be shortened or modified? When loading , I get the attached error messages.

I am trying to conceptualize what is supposed to happen here.

Are both Example 4 Max Output and 3D depth running at the same time with 3D Depth making calls to the Processing App?

Do the Processing App and routine need to be in certain locations in the computer?

Thanks, Mark

When running Example4_MaxOutput.ino I get in Serial Monitor this error message:

“Guru Meditation Error: Core 1 panic’ed (StoreProhibited). Exception was unhandled.”

Googling this, it suggests the program is writing to a forbidden area.

Examining other Examples, they don’t have this line:

myImager.setWireMaxPacketSize(128); // Increase default from 32 bytes to 128 - not supported on all platforms

One other Examples has it as an option, but commented out. When I uncommented it, I got the same error on that sketch.

I tried changing 128 to the default of 32 but the error persisted.

When I commented out the statement completely, IT WORKED!

ALSO in SparkFun_VL53L5CX_3D_Depth_Map.pde line 109 says:

void serialEvent(Serial p){

and gives error if you look in Errors on Processor “unused variable p line 109”.

I assume they meant “port” so I changed it and the error vanished.