Mar-01-2019, 04:06 PM
Hi there,
i am new in programming and i am using a rpi 3 b with python 2.7 to control a couple of servo motors but i have a couple of problems with my code.
I want to use keyboard inputs to activate my gpio's.
I have done some research and i found a library that can help me do that but i am getting all kind of bugs. Basically i want the keyboard controls i type to go in a variable (i use raw_input). I dont know though how to write the keyboard keys in the code. For example i know that up arrow is KEY_UP, down arrow is KEY_DOWN etc. Is there any way that i can see how to express each key to my code?
Or any different idea on how to make this work ?
Thanks in advance
i am new in programming and i am using a rpi 3 b with python 2.7 to control a couple of servo motors but i have a couple of problems with my code.
I want to use keyboard inputs to activate my gpio's.
I have done some research and i found a library that can help me do that but i am getting all kind of bugs. Basically i want the keyboard controls i type to go in a variable (i use raw_input). I dont know though how to write the keyboard keys in the code. For example i know that up arrow is KEY_UP, down arrow is KEY_DOWN etc. Is there any way that i can see how to express each key to my code?
Or any different idea on how to make this work ?
Thanks in advance