Keyboard input

Discussion related to "under the hood" OpenMV topics.
mjs513
Posts: 71
Joined: Sun Apr 30, 2017 12:52 pm

Keyboard input

Postby mjs513 » Fri Aug 11, 2017 12:31 am

Hi.
Was wondering if there was a way for a user to input commands from the keyboard with the openmv. I tried:
try:
mode=int(raw_input('Input:'))
except ValueError:
print "Not a number"

but got an error on raw_input. Same thing here
mport msvcrt

def kbfunc():
x = msvcrt.kbhit()
if x:
ret = ord(msvcrt.getch())
else:
ret = 0
return ret

import win32com.client

Thanks
Mike
User avatar
kwagyeman
Posts: 1175
Joined: Sun May 24, 2015 2:10 pm

Re: Keyboard input

Postby kwagyeman » Fri Aug 11, 2017 1:04 am

Nope, not right now. I have a plan to offer something to allow OpenMV IDE to automatically handle cases like this with dialog pop-ups. But we don't have anything like that currently.
Nyamekye,
mjs513
Posts: 71
Joined: Sun Apr 30, 2017 12:52 pm

Re: Keyboard input

Postby mjs513 » Fri Aug 11, 2017 8:40 am

Thanks man. Didn't think so but just wanted to be sure. Wanted to be able to programmatically change options while still running the program.
Apollo22
Posts: 9
Joined: Fri Aug 11, 2017 5:14 am

Re: Keyboard input

Postby Apollo22 » Fri Aug 11, 2017 8:51 am

You could implement I2C or CAN and change you settings by receiving info from them.

Or change a config file while the program is running.

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest