2020-12-04 01:19 PM
First I need to be able to read measurements from the 3 sensors at the same time and since there is only a program that activates one sensor at a time and by reading UM2757 I understood that that I suppose to solder U10 (corresponding to PC7) to activate interrupt on Left Sensor and U15(Corresponding to PB5) on the right pin.
In the CALLBACK ,I added if statements to deal with each of the sensor when I change the variable TOFSensor depending on which sensor I would like to read from, I noticed that it executes all the if statements (Which is not correct ).
I have a theory regarding this :
In "Solder drop configurations" it's written :'the VL53L3CX interrupt of the left and right breakout boards, GPIO1_L and GPIO1_R, can be shared with the VL53L3CX interrupt on the main board, GPIO1, by fitting U7 and U8 solder drops. By default U7 and U8 are not fitted.'
In my case on my board U7 and U8 are fitted ,this is how they came from the industry, please check figure:Myboard_53L3A2.
Should I just remove the solder on U7 and U8 ?
Thank you,Huda
2022-03-29 08:33 AM
I've never played with the interrupts. I found it a pain.
Instead, I used polling to get the answer.
Start the 3 sensors at nearly the same time. You then have 20ms to do some work. Then poll for the first result, when you get it, the second and third should be just about ready.
If you are doing this as an experiment in gestures, it should be good enough to get you going.
You could use a hybrid approach. Start the center sensor, then the other two. When the center one is done, you get the interrupt, and then you can poll to make sure the right and left are done too.
But you are correct in thinking that by modification of the solder bridges you should be able to get 3 independent interrupts.
Your board appears to be a V5, where mine is a V4. And it looks like mine are NOT bridged. So you have found a difference. (I also see some silkscreen differences as well. Mine are not labeled as GPIO1_L and GPIO1_R.) I'd assume the documentation did not keep pace with the latest version of the board, and use a scope to know which configuration your board is in.
-john