Hello everybody. I have wrote a program in python using getch() function to recieve inputs from user and I want to stop this input in specific times How can I achieve that? example => key_passwrd = getch.getch() Also , curses.endwin() works fine ,if I use this one: control = curses.initscr() curses....
Hello I have a problem in my python 's code. I use curses input to get inputs from user ,when I press "a" ,do this ,when "m" is pressed ,do something else . When I press "v" ,I call a function that has inside another input(the normal input we know,for example : a = input("Give a number") ) But the p...
Ok,I think I did it. Code: import cv2 cap = cv2.VideoCapture(0) cap.set(3 , 320) cap.set(4 , 240) def open_camera(capture): global cap if(capture): ret , frame = cap.read() if(ret): cv2.imshow("I see you !!!" , frame) else: cap = cv2.VideoCapture(0) cap.set(3 , 320) cap.set(4 , 240) if(cv2.waitKey(1...
Hello. I'm trying to figure out and solve a problem in my code without result. I have a file in which I have a function to open camera. import cv2 cap = cv2.VideoCapture(0) cap.set(3, 320) cap.set(4 , 240) def open_camera(capture): if(capture): ret , frame = cap.read() cv2.imshow("I see you !!!" , f...
Thanks for the update , but I don't want communication via wifi/internet.
Can these 2 raspberries communicate via usb cable or rx/tx pins ?
If yes ,can you provide me an example/program(code) or a specific link between them?
Hello
If I have 2 raspberry pi and I have a program running on rasPi #1 and another program (a function) running on rasPi #2 and I connect it via usb ,how can I call the function from rasPi #2 to the program running on raPi #1 ,using python3 ?
Ok I'm sorry
The waitkey function waits a few ms for user input but I want to have an input that don't need to wait not at all.
So my question is how can I replace waitkey with another input that don't need to wait.
Yes ,the window closes and the problem is that the whole program terminates,but in the code I don't tell it to terminate the whole program ,I just say to set the camera off and and keep doing other things...
Hello.I have a program and a part of it is to open a camera with opencv Another part of program is to give inputs using curses(do NOT wait/stop the other parts of program until user give an input ) But when I open a camera AND then give an input the program sticks a little bit and this is very very ...
Hello. I have a problem with a program in python3 and I want your help!! I have a function to open my camera using opencv (function -> open_camera() ) Then I have another part of program which is running with open_camera() at the SAME time and it works VERY GOOD , but when I press 'c' button to rele...
Hello. I want to print a word with colour by calling a function ,but I get an error.How can I fix it ? I want to call these colours by functions , because the program is big . Code: def green_colour(): Green_message = "\u001b[32m" def reset_colour(): Reset_message = "\u001B[0m" print(green_colour() ...
Hello again. I tried to run this code that someone sent me (Thank you!!!) and it works fine . Code: import curses import time b = True end = time.time() def ooo(): stdscr = curses.initscr() curses.noecho() stdscr.nodelay(1) # set getch() non-blocking stdscr.addstr(0,0,"Write something:\n") line = 1 ...
I will describe my problem with an example.
I have a led and I want to blink it every 0.5 seconds and I have an input .
If input == "a" ,do something ,but I don't want to stop led blinking.