Barcode detection with pin output singnal

hi guys,
i detect code 128 type barcode with i need pin output singnal
plz help

See the examples menu and bars code detection example. Then see the gpio pin control examples.

1 Like

I see the examples but I don’t understand. how to get output from Pin1.
plz modified below example
plz help

Hi, I don’t know what you want. You seem to want us to writ ethe code for you. I will not do that.

blow code modified to barcode detection

import sensor, image, time

# Color Tracking Thresholds (L Min, L Max, A Min, A Max, B Min, B Max)
thresholds = [(30, 100, 15, 127, 15, 127)]

sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False) # must be turned off for color tracking
sensor.set_auto_whitebal(False) # must be turned off for color tracking
clock = time.clock()

# Only blobs that with more pixels than "pixel_threshold" and more area than "area_threshold" are
# returned by "find_blobs" below. Change "pixels_threshold" and "area_threshold" if you change the
# camera resolution. "merge=True" merges all overlapping blobs in the image.

pin1 = Pin('P1', Pin.OUT_PP, Pin.PULL_NONE)

    img = sensor.snapshot()
    blobs = img.find_blobs(thresholds, pixels_threshold=200, area_threshold=200, merge=True)
    for b in blobs:
    pin1.value(len(blobs) == 6)