Need multi tasking (4 task), how to code ?
Posted: Wed May 18, 2016 12:42 am
I mean not need advice for full coding, just want to know how to multitasking ?
If Using macro call ? Then what to do with delay function ? Because if have delay in a macro, then other macro call will be delayed as well ??
Interrupt ?? as sensor must sense all the time ??
Please advice,
If to make a robotic buggy run follow reflective narrow foil tape with,
1. On top light sensor to control line-1 of Led blinking rate.
2. Sound sensor to control line-2 of Led blinking rate.
3. Left foil edge sensor to control speed of front left wheel speed.
4. Right foil edge sensor to control speed of front right wheel speed.
(function 3 and 4 to turn Buggy left or right to follow the line)
As all 4 function need to do simultaneously, but processor code run sequential, in otherword need multi tasking (4 task) then how to code ?
Thanks.
Amrat
If Using macro call ? Then what to do with delay function ? Because if have delay in a macro, then other macro call will be delayed as well ??
Interrupt ?? as sensor must sense all the time ??
Please advice,
If to make a robotic buggy run follow reflective narrow foil tape with,
1. On top light sensor to control line-1 of Led blinking rate.
2. Sound sensor to control line-2 of Led blinking rate.
3. Left foil edge sensor to control speed of front left wheel speed.
4. Right foil edge sensor to control speed of front right wheel speed.
(function 3 and 4 to turn Buggy left or right to follow the line)
As all 4 function need to do simultaneously, but processor code run sequential, in otherword need multi tasking (4 task) then how to code ?
Thanks.
Amrat