IDE/Serial terminal question for manual trigger


Why can’t I type anything at the prompt in the serial terminal in the IDE?

I was trying to trigger the OpenMV using text entered in the serial terminal that would satisfy a conditional in my program. For whatever reason, I can’t type anything into the serial terminal in the IDE though. I’m thinking that I am missing something very basic here, as right above the >>> it says “Type help() for more information”, and I can’t do that… Assuming that you can help me with that, is triggering with this approach the best way? Ultimately, the trigger will come through an I2C message, but I haven’t build that side of things yet.


In the OpenMV IDE simply go to tools->open terminal and create a new terminal. From there you can stop and start the onboard script, and play around/test commands before implementing them into your code.
I use it all the time.

Our debug protocol doesn’t support user input. The Open Terminal described above talks to the camera like a REPL MicroPython board which does support user input. However, the way images are moved to the IDE changes ad you explicitly have to do it versus it happening automatically.

There’s a video on our YouTube about this.

I tried opening a new terminal and got an error because I’m assuming that the IDE is using the same COM port that the new terminal uses. If not, I will try again. I’ll also watch the YouTube video.

I haven’t put the script on the OpenMV yet. Part of that has to do with me still just playing around but also, I assumed that if I did run the script onboard, then I wouldn’t be able to use the image viewer in the IDE.

I could have sworn that I was able to type “help()” at the prompt previously, but I may be mistaken.

Any idea on why nothing I type shows up at the >>> prompt?

You need to disconnect the IDE from the camera to use the Open Terminal feature.

Um, so, to understand, the OpenMV Cam is a MicroPython board. All MicroPython boards talk REPL. The Open Terminal feature just allows you to talk REPL to a camera. REPL allows for you to send text.

When the IDE connect to a camera via the main window it is not talking REPL… but, using a debug protocol we developed that has separate text/video streams. This debug protocol has no way to control the camera. I’ve wanted to add more debug features to support camera control but I haven’t had time to design these.

Any idea on why nothing I type shows up at the >>> prompt?

Press enter. In debug mode we can force the camera to print >>> while in REPL mode we don’t do that.

Ok. It sounds like opening a terminal is what I need to do.

I still can’t type at the prompt in the IDE, even after pressing enter. I could have sworn I was able to before, but I could very well be wrong. Even though I don’t need to do this right now, it’s bothering me that I can’t. See attached, and let me know how to do it or if I’m losing my mind and was never able to.

Pressing enter in the terminal has never worked. It’s just an output terminal, we don’t accept serial data input there.

Create a bug in GitHub for text input. Maybe We can add it. It’s not hard to do per say. I don’t know where to send the text input however. I guess when you call input () we can pipe it to that.

OK. I guess I must be misremembering typing into the IDE terminal. Sorry about all the back and forth.

I was able to open a terminal and do just what you suggested using input(). And that’s exactly what I was looking to do. If I could do that in the IDE, that would save me the extra step of opening the terminal. That being said, opening the terminal is pretty easy, so I’m not sure it’s really necessary unless it’s easy for you to do.


It’s like something we should do that just isn’t going to get done because there’s so much else to do. That said, create a bug request for it on GitHub under the OpenMV IDE project and it will be tracked as wanted at atleast.

Totally get it, and the other stuff you’re doing is awesome. I’ll put the bug request in.