Control loop with scanf

This is a discussion on Control loop with scanf within the C Programming forums, part of the General Programming Boards category; Hi,
Basically I'm using C to control an external board. (interfacing)
So, what I need the LEDs on the board ...

Control loop with scanf

Hi,
Basically I'm using C to control an external board. (interfacing)
So, what I need the LEDs on the board is to blink until a user inputs char 'a'.
The thing is, if I used scanf, the blinking would pause and wait until the user inputs char 'a'.

Is there any way to avoid pausing the program, but at the same time end the blink loop when the user inputs char 'a'??

Two threads will run "simultaneously". If you have a dual core processor and an OS with support for MultiThreading, you can even run both threads REALLY at the same time. Otherwise it will appear to humans to run simultaneously, but it will actually run for a few tens of milliseconds at a time (or in the case of waiting for input, the other thread will run, and the one waiting for input will simply sit there and wait for the keyboard entry).

It's not so much that you can use the "output" of one thread to control another, but that you can use one thread to CONTROL another thread.

well, we are using Ubuntu-Linux OS, but I think we gonna use comp with a single-cored processor.
the problem is that we have not covered Threads yet... so, do you know any source that could teach in a short period of time how to program and use Threads??