On an OpenMV M7 board, I detect blobs. Then I want to set a pin high if there are any blobs.
I do that like this
p_out = Pin("P0", Pin.OUT_PP)
and then, later in the code after blob detection (which I can see works in the terminal with the print()-statement) in the looping part of the script:
if blobs != []:
print(blobs)
p_out.high()
else:
p_out.low()
The raspbarry that the OpenMV board is connected to does not detect any signal except for an occational blip that appears unrelated to the presence of blobs.
I have tested that i can detect by passing power to it from a different source, so the issue must be the OpenMV. Am I doing something wrong?
please use p_out.value=(True) or p_out.value=(False)
also make sure that this is ‘P0’ and not “P0”.
make sure grounds are connected too.
use pullup/down resistors also.
There is no luck getting a high signal through, though. If I connect the signal wire to 3.3v on the openMV I can see that as a signal proving there is a circuit.
p_out.value=(True) triggers an error as you can see bellow.
Just to be sure… I assume setting p0 to high/true means that the pin that has p0 printed next to it on the board will be set to high, right? There is no BCM/board switching as on raspberry or anything like that, right?
With no argument, return 0 or 1 depending on the logic level of the pin.
With value given, set the logic level of the pin. value can be anything that converts to a boolean. If it converts to True, the pin is set high, otherwise it is set low.
It seems to me I am doing this exactly as the doc says I should - why doesn’t it work?