Support: Cannot run demo scripts.

Discussion related to "under the hood" OpenMV topics.
robmurrer
Posts: 3
Joined: Sat Feb 13, 2016 1:13 pm

Support: Cannot run demo scripts.

Postby robmurrer » Sat Feb 13, 2016 1:43 pm

I am playing with my OpenMV that I got (order number: 1024). I cannot seem to get any of the demo scripts to run from the IDE. I can screen into the the it though:

Code: Select all

Micro Python v1.4.4-125-g07c8f99 on 2015-08-18; OPENMV2 with STM32F427
Type "help()" for more information.
>>> sensor.reset()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'sensor' is not defined
>>> import sensor
>>> sensor.reset()
>>> sensor.snapshot()
<image width:160 height:120 bpp:2>
>>> 
I've read some of the docs and it seems the IDE is not ready for prime time yet. How do I work with this product without the IDE?
User avatar
deshipu
Posts: 74
Joined: Sat Jan 09, 2016 5:36 am
Location: Zürich
Contact:

Re: Support: Cannot run demo scripts.

Postby deshipu » Sat Feb 13, 2016 1:54 pm

I can use the IDE just fine (after some initial problems with firmware flashing). Are you getting any errors? What do you do exactly?
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Support: Cannot run demo scripts.

Postby kwagyeman » Sat Feb 13, 2016 2:09 pm

I heavily recommend that you just follow this guide here: https://github.com/openmv/openmv/wiki

Also, did you read through the tutorial? https://openmv.io/docs/openmv/tutorial/index.html

If you can get the linux dev environment setup you'll be able to get all of our fixes which are going to come pretty frequently.
Nyamekye,
robmurrer
Posts: 3
Joined: Sat Feb 13, 2016 1:13 pm

Re: Support: Cannot run demo scripts.

Postby robmurrer » Sat Feb 13, 2016 2:51 pm

So I am noticing I clicked OpenMV1... Thought I had 1 but I guess I have 2 :)

I got it to give me an image in the frame buffer. Sorry for the false alarm.

I will go look into setting up a linux vm... I'm on OS X.
blmorris
Posts: 7
Joined: Fri Jan 08, 2016 10:24 pm

Re: Support: Cannot run demo scripts.

Postby blmorris » Tue Feb 16, 2016 11:23 am

robmurrer wrote:So I am noticing I clicked OpenMV1... Thought I had 1 but I guess I have 2 :)

I got it to give me an image in the frame buffer. Sorry for the false alarm.

I will go look into setting up a linux vm... I'm on OS X.
I've also found that the IDE is less robust loading the example code on OSX than it is on Linux (Ubuntu). Mostly this manifests as having to hit "Connect" and then "Execute" several times before the code will run.
This is running the IDE from the current source tree, not the pre-built OSX application. I can't dig into it right now, but I suspect that there is an issue with USB being handled differently in OSX than in Linux (encountered this before). When I get back to the office next week I'll see if I can find any notable differences between OSX and Linux with my Beagle USB bus analyzer.

-Bryan
User avatar
kwagyeman
Posts: 4430
Joined: Sun May 24, 2015 2:10 pm

Re: Support: Cannot run demo scripts.

Postby kwagyeman » Tue Feb 16, 2016 12:26 pm

Oh, you have a USB analyzer? Nice. Those things are very pricey.

As for our code with connecting. We're just talking to the camera as a serial port... we really don't have that much setup logic. See here: https://github.com/openmv/openmv/blob/m ... nmv.py#L42

I guess the python serial code needs work.
Nyamekye,
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: Support: Cannot run demo scripts.

Postby iabdalkader » Tue Feb 16, 2016 1:31 pm

Mostly this manifests as having to hit "Connect" and then "Execute" several times before the code will run.
This was fixed recently.

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests