# IDE Disconnect

**URL:** <https://forums.openmv.io/t/ide-disconnect/306>\
**Category:** OpenMV Boards\
**Created:** [June 16, 2017, 8:37pm UTC](https://forums.openmv.io/t/ide-disconnect/306 "2017-06-16T20:37:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaddyOh](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@DaddyOh](https://forums.openmv.io/u/DaddyOh)\
**Post date:** [June 16, 2017, 8:37pm UTC](https://forums.openmv.io/t/ide-disconnect/306/1 "2017-06-16T20:37:33Z")

</div>

Not sure if this is related to the other post on IDE disconnects.

12 files on the SD card and this program is supposed to loop through them and look for blue blobs.

IDE 1.6.0  
Windows 8 system  
board is running latest firmware.

Ii never completes all 12 files and the images never display in the framebuffer. The first several images are not expected to have blue blobs.

```python
import sensor
import image
import time
import sys
import os

threshold_index = 2 # 0 for red, 1 for green, 2 for blue

# Color Tracking Thresholds (L Min, L Max, A Min, A Max, B Min, B Max)
# The below thresholds track in general red/green/blue things. You may wish to tune them...
thresholds = [(30, 100, 15, 127, 15, 127), # generic_red_thresholds
              (30, 100, -64, -8, -32, 32), # generic_green_thresholds
              (0, 100, 27, 55, 75, -60)] # generic_blue_thresholds

sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.snapshot()

print("=== start ===")

file_path = "/ftc/2016images/tests"
files = os.listdir(file_path)
print(files)

for file in files:
    full_file = '/'.join((file_path, file))
    print(full_file)
    img = image.Image(full_file, copy_to_fb=True)
    i = 0
    for blob in img.find_blobs([thresholds[threshold_index]], pixels_threshold=20, area_threshold=20, merge=True):
        i = i + 1
        img.draw_rectangle(blob.rect(), color=(255,0,0))
        img.draw_cross(blob.cx(), blob.cy(), color=(255,0,0))
        print(i)
    sensor.snapshot()

```

The output is inconsistent

```python
=== start ===
['gears_bright.bmp', 'gears_dark.bmp', 'gears_identical.bmp', 'legos_bright.bmp', 'legos_dark.bmp', 'legos_identical.bmp', 'plyers_bright.bmp', 'plyers_dark.bmp', 'plyers_identical.bmp', 'wheels_bright.bmp', 'wheels_dark.bmp', 'wheels_identical.bmp']
/ftc/2016images/tests/gears_bright.bmp

=== start ===
['gears_bright.bmp', 'gears_dark.bmp', 'gears_identical.bmp', 'legos_bright.bmp', 'legos_dark.bmp', 'legos_identical.bmp', 'plyers_bright.bmp', 'plyers_dark.bmp', 'plyers_identical.bmp', 'wheels_bright.bmp', 'wheels_dark.bmp', 'wheels_identical.bmp']
/ftc/2016images/tests/gears_bright.bmp
/ftc/2016images/tests/gears_dark.bmp
/ftc/2016images/tests/gears_identical.bmp

```

Any help you can provide would be appreciated.

Eric aka DaddyOh

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [June 17, 2017, 1:27am UTC](https://forums.openmv.io/t/ide-disconnect/306/2 "2017-06-17T01:27:39Z")

</div>

Can you upload a test package? Also, did you install the latest IDE? If not then yo’re getting hit by the 40 ms timeout. This is causing the IDE to disconnect but your script should run fine.

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [June 17, 2017, 1:28am UTC](https://forums.openmv.io/t/ide-disconnect/306/3 "2017-06-17T01:28:16Z")

</div>

The latest IDE being the one I posted on the forums you alluded too. Going to do a patch release for the IDE this weekend.

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [June 17, 2017, 4:00am UTC](https://forums.openmv.io/t/ide-disconnect/306/4 "2017-06-17T04:00:21Z")

</div>

Here’s the link: [http://upload.openmv.io/openmv-ide-windows-1.7.0/openmv-ide-windows-1.7.0.exe](http://upload.openmv.io/openmv-ide-windows-1.7.0/openmv-ide-windows-1.7.0.exe)

---

<div class="post-metadata">

**Author:** ![DaddyOh](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@DaddyOh](https://forums.openmv.io/u/DaddyOh)\
**Post date:** [June 17, 2017, 10:43am UTC](https://forums.openmv.io/t/ide-disconnect/306/5 "2017-06-17T10:43:15Z")

</div>

Nyamekye,

Thanks. Runs perfect now. I really appreciate the fast response.

Eric
