Hi,
AVR's aren't multitasking so you can do several things at once. What you could do is run several things one after the other very quickly*.
To do something like that you should use a serial input buffer, and use iskeywaiting/inkey to read from the serial port (rather than input which waits for key presses).
Show us what you've got up till now and I imgine someone can help you.
* I have a project that drives 16 digital I/Os, 2 serial ports, reads 2 i2c sensors, PID controller driving PWM and the whole thing takes less than 8ms to run through, and about 6ms are spent reading the i2c sensors.
Regards
Ian Dobson
↧