logo

为什么openmv会自己打印帧率?有时脱机也不运行里面程序?

2019-11-11 23:47
L
清风
import sensor, image, time,math
import car
from pid import PID
from pyb import UART
from pyb import LED

sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.RGB565) # use RGB565.
sensor.set_framesize(sensor.QVGA) # use QQVGA for speed.
sensor.skip_frames(10) # Let new settings take affect.
sensor.set_auto_whitebal(True) # turn this off.
clock = time.clock() # Tracks FPS.

uart = UART(3, 9600, timeout_char=1000)
uart.init(9600, bits=8, parity=None, stop=1,timeout_char=1000)#串口通讯初始化设置

while(True):
    clock.tick() # Track elapsed milliseconds between snapshots().  
    print("haha")
L
清风

38.46154

38.46154

38.46154

38.09524

38.16794

37.97468

38.04348

37.91469

37.97468

37.87879

37.93103

37.97468

38.0117

37.94038

37.97468

37.91469

37.94643

37.89474

37.92415

37.87879

37.90614

37.93103

37.9538

37.97468

37.99392

37.9562

37.97468

37.94038

37.95811

37.92667

37.94369

37.95967

37.97468

37.94643

37.96095

37.93467

37.94872

37.92415

37.93774

37.95067

37.96296

37.97468

37.98587

37.96376

37.97468

37.9538

37.96446

37.94466

37.95507

37.96507

37.94643

37.9562

37.96562

37.948

37.95721

37.94038

37.9494

37.93329

37.94212

37.92667

37.93533

37.94369

37.95181

37.93717

37.94513

37.93103

37.93884

37.92527

37.93293

37.94038

37.92735

37.93467

37.94179

37.92927

37.93627

37.92415

38.46154

37.73585

37.97468

37.73585

37.87879

37.97468

38.04348

37.91469

37.97468

37.87879

37.93103

37.85489

37.90087

37.83784

37.87879

37.91469

37.94643

37.89474

37.92415

37.87879

37.90614

37.86575

37.89127

37.85489

37.87879

37.90087

37.92135

37.88904

37.9085

37.87879

37.89731

37.86982

37.88749

37.86192

37.87879

37.89474

37.90984

37.88634

37.90087

37.87879

37.89279

37.87196

37.88546

37.89836

37.87879

37.89127

37.90323

37.88477

37.89637

37.87879

37.89005

37.87327

37.8842

37.86816

37.87879

37.88904

37.89894

37.88374

37.89339

37.87879

37.8882

37.87416

37.88334

37.86982

37.87879

37.88749

37.89593

37.88301

37.89127

37.87879

37.88687

37.8748

37.88272

37.89043

37.87879

37.88634

38.46154

37.73585

37.97468

37.73585

37.87879

37.73585

37.83784

37.73585

37.81512

37.87879

37.93103

37.85489

37.90087

37.83784

37.87879

37.82506

37.86192

37.89474

37.84861

37.87879

37.90614

37.93103

37.9538

37.91469

37.93627

37.90087

37.92135

37.94038

37.9085

37.92667

37.94369

37.91469

37.93103

37.90413

37.91983

37.89474

37.90984

37.92415

37.90087

37.91469

37.92784

37.90614

37.91887

37.89836

37.9107

37.89127

37.90323

37.91469

37.89637

37.90751

37.91822

37.90087

37.9113

37.89474

37.90489

37.88904

37.89894

37.9085

37.89339

37.90272

37.91175

37.89731

37.90614

37.89224

37.90087

37.88749

37.89593

37.90413

37.89127

37.8993

37.9071

37.89474

37.90239

37.89043

37.89793

37.88634

38.46154

38.46154

37.97468

38.09524

38.16794

37.97468

38.04348

37.91469

37.97468

37.87879

37.93103

37.97468

37.90087

37.94038

37.97468

37.91469

37.94643

37.89474

37.92415

37.87879

37.90614

37.93103

37.89127

37.91469

37.93627

37.90087

37.92135

37.88904

37.9085

37.92667

37.89731

37.91469

37.88749

37.90413

37.91983

37.89474

37.90984

37.88634

37.90087

37.87879

37.89279

37.90614

37.88546

37.89836

37.9107

37.89127

37.90323

37.88477

37.89637

37.87879

37.89005

37.90087

37.8842

37.89474

37.90489

37.88904

37.89894

37.88374

37.89339

37.87879

37.8882

37.89731

37.88334

37.89224

37.90087

37.88749

37.89593

37.88301

37.89127

37.87879

37.88687

37.89474

37.88272

37.89043

37.89793

37.88634

38.46154

37.73585

37.97468

38.09524

38.16794

38.21656

38.04348

Traceback (most recent call last):

File "<stdin>", line 2, in <module>

File "car.py", line 14, in <module>

Exception: IDE interrupt

MicroPython v1.9.4-4580-g7747c5b36 on 2019-09-27; OPENMV4 with STM32H743

Type "help()" for more information.

>>>

2019-11-12 14:22
I
网红小智智 星瞳科技

我运行这个代码就没有出错误。

037b3e4b-4c2c-411d-94ab-1f4c63aa10e2.png