I ssh in to my pi and want to control stepper motors from the keyboard while dev/testing.
I dev in C (lots of grey hair here) not snake oil python.
int fd, n;
fd = open("/dev/tty", O_RDWR | O_NONBLOCK);
I can get a
to return -1 when no data is waiting but a positive number when I have data.
Each character I type is delivered 1 at a time in "c".
The only trouble is that I need to type a return to get the data into program.
How do I make input non_blocking and character at a time. There must be a way to switch off
the return being needed on non-blocking input?
(note I am using /dev/tty NOT the uart serial cable.
I have a few nema 23 motors running great off the GPIO pins on the pi. The logic signals can feed straight into a 1 axis driver board I got off ebay. The driver board runs ok on 3.3V since the pullup is to 3.3 and the grounding of the signal is used to drive the step and direction logic